mirror of
https://github.com/enso-org/enso.git
synced 2024-11-23 06:34:35 +03:00
ace459ed53
Use JavaScript to parse and serialise to JSON. Parses to native Enso object. - `.to_json` now returns a `Text` of the JSON. - Json methods now `parse`, `stringify` and `from_pairs`. - New `JSON_Object` representing a JavaScript Object. - `.to_js_object` allows for types to custom serialize. Returning a `JS_Object`. - Default JSON format for Atom now has a `type` and `constructor` property (or method to call for as needed to deserialise). - Removed `.into` support for now. - Added JSON File Format and SPI to allow `Data.read` to work. - Added `Data.fetch` API for easy Web download. - Default visualization for JS Object trunctes, and made Vector default truncate children too. Fixes defect where types with no constructor crashed on `to_json` (e.g. `Matching_Mode.Last.to_json`. Adjusted default visualisation for Vector, so it doesn't serialise an array of arrays forever. Likewise, JS_Object default visualisation is truncated to a small subset. New convention: - `.get` returns `Nothing` if a key or index is not present. Takes an `other` argument allowing control of default. - `.at` error if key or index is not present. - `Nothing` gains a `get` method allowing for easy propagation. |
||
---|---|---|
.. | ||
src | ||
package.yaml |