Add to_json for maps.

This commit is contained in:
Stephen Chung
2022-04-21 12:15:21 +08:00
parent 4f2764d233
commit c3d013bddc
6 changed files with 205 additions and 129 deletions

View File

@@ -15,6 +15,8 @@ Enhancements
* `Module::eval_ast_as_new_raw` is made public as a low-level API.
* Improper `switch` case condition syntax is now caught at parse time.
* `Engine::parse_json` now natively handles nested JSON inputs (using a token remap filter) without needing to replace `{` with `#{`.
* `to_json` is added to object maps to cheaply convert it to JSON format (`()` is mapped to `null`, all other data types must be supported by JSON)
* A global function `format_map_as_json` is provided which is the same as `to_json` for object maps.
Version 1.6.1