You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jacob Williams edited this page Jul 11, 2019
·
3 revisions
To set various options for parsing, file format, and data access, use the optional arguments to the various initialize() routines. See the documentation for json_initialize() for details.
Example
program main
use json_module
implicit none
type(json_file) :: json
! to parse a JSON file with "#" comments, and if
! there are any errors, thenstop immediately:
call json%initialize(stop_on_error =.true., &
comment_char ='#')
call json%load(filename='myfile.json') ! load the file
call json%print() ! printto the console
call json%destroy() ! free memory
end program main