toJson, jsonTo, json (de)serialization for custom types; remove dependency on strtabs thanks to a hooking mechanism (#14563)
* json custom serialization; application for strtabs
* serialize using nesting
* make toJson more feature complete
* add since
* Revert "Improve JSON serialisation of strtabs (#14549)"
This reverts commit 7cb4ef26ad.
* better approach via mixin
* toJson, jsonTo
* fix test
* address comments
* move to jsonutils
* doc
* cleanups
* also test for js
* also test for vm
This commit is contained in:
parent
733bd76f6b
commit
c7a1a7b8bf
5 changed files with 203 additions and 31 deletions
|
|
@ -108,6 +108,8 @@
|
|||
users from the use of weak and insecure ciphers while still provides
|
||||
adequate compatiblity with the majority of the Internet.
|
||||
|
||||
- new module `std/jsonutils` with hookable `jsonTo,toJson,fromJson` for json serialization/deserialization of custom types.
|
||||
|
||||
## Language changes
|
||||
- In the newruntime it is now allowed to assign discriminator field without restrictions as long as case object doesn't have custom destructor. Discriminator value doesn't have to be a constant either. If you have custom destructor for case object and you do want to freely assign discriminator fields, it is recommended to refactor object into 2 objects like this:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue