Closed jvo203 closed 3 years ago
Solved: call json%initialize(non_normal_mode=2)
Yes, the options are:
integer(IK),intent(in),optional :: non_normal_mode
!! How to serialize NaN, Infinity, and
!! -Infinity real values:
!!
!! * 1 : as strings (e.g., "NaN",
!! "Infinity", "-Infinity") [default]
!! * 2 : as JSON `null` values
See also null_to_real_mode
and use_quiet_nan
.
json-fortran apparently supports
null
output for NaN real values. But I am unable to force it to do so. The ifort compiler outputs an error:Incidentally,
call json%initialize(use_quiet_nan=.true.)
compiles fine. Am using the up-to-date json-fortran source code from github.