aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-17 14:24:18 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-17 14:24:18 -0400
commit724c0fcf9e227babe540dea175ce20438a466b88 (patch)
tree41cf79a2563853688e64ec5d2d698ab8c52a8f6a /lib
parentcdc6037af740566d5329cef9d303f06e81682780 (diff)
Major improvements to type inference to support `JSON({"key"=yes,
"key2"=[1,2,{"ok"=JSON.Null}]})` and similar fancy type inference stuff.
Diffstat (limited to 'lib')
-rw-r--r--lib/json/README.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/json/README.md b/lib/json/README.md
index eb0d6c88..33e2101a 100644
--- a/lib/json/README.md
+++ b/lib/json/README.md
@@ -5,7 +5,9 @@ This is a library for encoding/decoding JSON values.
## Usage
```tomo
-j := JSON.Object({"key": Number(1.5), "key": Array([Boolean(yes), Null])})
+>> j := JSON({"key1"=123, "key2"=[yes, {"ok"="inner"}, JSON.Null]})
+= JSON.Object({"key1"=Number(123), "key2"=Array([Boolean(yes), Object({"ok"=String("inner")}), Null])})
+
say("$(j.encode())")
say("$(j.pretty_print())")