Format-preserving recursive-descent parser for JSON and JSONC.
Reads every character of the source into a node tree so the original
text can be reproduced exactly via (node/string root).
Supports:
Format-preserving recursive-descent parser for JSON and JSONC. Reads every character of the source into a node tree so the original text can be reproduced exactly via `(node/string root)`. Supports: - Standard JSON (RFC 8259) - JSONC extensions: line comments (//), block comments (/* */), trailing commas
(parse-string s)Parse a JSON or JSONC string into a node tree.
Returns a root node. For a document with leading/trailing whitespace or comments around a single value, returns the value node wrapped so that the extras are preserved.
The returned node satisfies (= input (node/string root)) for any
valid JSON/JSONC input.
Parse a JSON or JSONC string into a node tree. Returns a root node. For a document with leading/trailing whitespace or comments around a single value, returns the value node wrapped so that the extras are preserved. The returned node satisfies `(= input (node/string root))` for any valid JSON/JSONC input.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |