jsonutils.toJson now serializes JsonNode as is by default (#18097)
* jsonutils.toJson now serializes JsonNode as is (without deep copy nor treating it as a regular ref object) * JsonNodeMode
This commit is contained in:
parent
9559350e34
commit
369a7d1246
3 changed files with 41 additions and 5 deletions
|
|
@ -69,7 +69,9 @@
|
|||
previous behavior for a transition time, see PR #17467.
|
||||
|
||||
- `jsonutils` now serializes/deserializes holey enums as regular enums (via `ord`) instead of as strings.
|
||||
Use `-d:nimLegacyJsonutilsHoleyEnum` for a transition period.
|
||||
Use `-d:nimLegacyJsonutilsHoleyEnum` for a transition period. `toJson` now serializes `JsonNode`
|
||||
as is via reference (without a deep copy) instead of treating `JsonNode` as a regular ref object,
|
||||
this can be customized via `jsonNodeMode`.
|
||||
|
||||
- `json` and `jsonutils` now serialize NaN, Inf, -Inf as strings, so that
|
||||
`%[NaN, -Inf]` is the string `["nan","-inf"]` instead of `[nan,-inf]` which was invalid json.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue