rename nimLegacyJsonutilsHoleyEnum [backport] (#18938)

* enable nimPreviewJsonutilsHoleyEnum [backport]

* docuement nimPreviewJsonutilsHoleyEnum
This commit is contained in:
flywind 2021-10-02 02:26:29 +08:00 • committed by GitHub
commit 5c4692fad4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -77,8 +77,7 @@
initialization with a small (< 30000) seed. Use `-d:nimLegacyRandomInitRand` to restore
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. `toJson` now serializes `JsonNode`
- With `-d:nimPreviewJsonutilsHoleyEnum`, `jsonutils` now can serialize/deserialize holey enums as regular enums (via `ord`) instead of as strings. It is expected that this behavior becomes the new default in upcoming versions. `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`.