json_module Module

A Modern Fortran JSON (JavaScript Object Notation) API.

This module provides access to json_value_module and json_file_module. For normal JSON-Fortran use, using this module is all that is necessary.

Note that this module renames the kind definition variables from json_kinds from [RK, IK, LK, CK, and CDK] to [json_RK, json_IK, json_LK, json_CK, and json_CDK] so as to avoid namespace pollution with short variable names.

Since USE_UCS4 is defined, this module also exports the operators ==, /=, and // from json_string_utilities for CK and CDK operations.


  • JSON-Fortran is released under a BSD-style license. See the LICENSE file for details.


  • Joseph A. Levin : March 2012 : Original FSON code [retrieved on 12/2/2013].
  • Jacob Williams : 2/8/2014 : Extensive modifications to the original FSON code. The original F95 code was split into four files: fson_path_m.f95, fson_string_m.f95, fson_value_m.f95, and fson.f95. The new code has been extensively updated, refactored and combined into this one module (json_module.f90). Various Fortran 2003/2008 features are now used (e.g., allocatable strings, newunit, generic, class, and abstract interface).
  • Development continues at: Github

See also


Originally JSON-Fortran was entirely contained within this module.


  • module~~json_module~~UsesGraph module~json_module json_module module~json_file_module json_file_module module~json_module->module~json_file_module module~json_kinds json_kinds module~json_module->module~json_kinds module~json_parameters json_parameters module~json_module->module~json_parameters module~json_string_utilities json_string_utilities module~json_module->module~json_string_utilities module~json_value_module json_value_module module~json_module->module~json_value_module module~json_file_module->module~json_kinds module~json_file_module->module~json_parameters module~json_file_module->module~json_string_utilities module~json_file_module->module~json_value_module iso_fortran_env iso_fortran_env module~json_file_module->iso_fortran_env module~json_kinds->iso_fortran_env module~json_parameters->module~json_kinds module~json_string_utilities->module~json_kinds module~json_string_utilities->module~json_parameters ieee_arithmetic ieee_arithmetic module~json_string_utilities->ieee_arithmetic module~json_value_module->module~json_kinds module~json_value_module->module~json_parameters module~json_value_module->module~json_string_utilities module~json_value_module->ieee_arithmetic module~json_value_module->iso_fortran_env


Type Visibility Attributes Name Initial
character(kind=json_CK, len=*), private, parameter :: version = '8.4.0'

JSON-Fortran version.


This string should match the one in the .VERSION file (which is used for the documentation generation.)


public function json_fortran_version() result(ver)

Returns the JSON-Fortran version string.



Return Value character(len=:), allocatable

JSON-Fortran version string