From e6321b6e7b09e4185bb192285711107b1c8357fa Mon Sep 17 00:00:00 2001 From: RayPals Date: Mon, 1 Jun 2026 00:54:55 +0200 Subject: [PATCH] Add examples/json_pretty.claro from Claro v1.17.26 zip --- examples/json_pretty.claro | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/json_pretty.claro diff --git a/examples/json_pretty.claro b/examples/json_pretty.claro new file mode 100644 index 0000000..2a2e1df --- /dev/null +++ b/examples/json_pretty.claro @@ -0,0 +1,13 @@ +# Pretty-print JSON from a file (validates + re-encodes) +IMPORT "lib/text.claro" AS text + +ASK "JSON file path:" AS p +TRY + READ FILE p AS t + PARSE JSON t AS v + MAKE JSON v AS out + SAY out +CATCH + SAY "Error:" + SAY LASTERROR +ENDTRY