From 724c0fcf9e227babe540dea175ce20438a466b88 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 17 Aug 2025 14:24:18 -0400 Subject: Major improvements to type inference to support `JSON({"key"=yes, "key2"=[1,2,{"ok"=JSON.Null}]})` and similar fancy type inference stuff. --- lib/json/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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())") -- cgit v1.2.3