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
Copy file name to clipboardexpand all lines: src/write.jl
+6-31
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,12 @@ Write JSON.
25
25
## Keyword Args
26
26
27
27
* `allow_inf`: Allow writing of `Inf` and `NaN` values (not part of the JSON standard). [default `false`]
28
+
* `inf_mapping`: A function to map `Inf`, `-Inf` and `NaN` values to a custom representation. [default `nothing`]
29
+
30
+
e.g. a quoted version of the default mapping
31
+
32
+
`quoted_inf_mapping(x) = x == Inf ? "\\"Infinity\\"" : x == -Inf ? "\\"-Infinity\\"" : "\\"NaN\\""`
33
+
28
34
* `dateformat`: A [`DateFormat`](https://docs.julialang.org/en/v1/stdlib/Dates/#Dates.DateFormat) describing how to format `Date`s in the object. [default `Dates.default_format(T)`]
0 commit comments