diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-08-17 13:33:23 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-08-17 13:33:23 -0400 |
| commit | cdc6037af740566d5329cef9d303f06e81682780 (patch) | |
| tree | 68ee927b9f8a77c597352c89f1c41adad6cc0045 /lib/json/README.md | |
| parent | 7e6f81749af2603a7d312c935c475c4223e5a8c1 (diff) | |
Add JSON module.
Diffstat (limited to 'lib/json/README.md')
| -rw-r--r-- | lib/json/README.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/json/README.md b/lib/json/README.md new file mode 100644 index 00000000..eb0d6c88 --- /dev/null +++ b/lib/json/README.md @@ -0,0 +1,16 @@ +# JSON + +This is a library for encoding/decoding JSON values. + +## Usage + +```tomo +j := JSON.Object({"key": Number(1.5), "key": Array([Boolean(yes), Null])}) +say("$(j.encode())") +say("$(j.pretty_print())") + +when JSON.parse("[1, null, true]") is Success(obj) + >> obj +is Failure(msg) + fail("Failed to parse JSON: $msg") +``` |
