JSON encoding for the HTTP transport and for decision handoff.
Uses cheshire on the JVM and js/JSON in ClojureScript and nbb. cheshire is
required only inside the :clj branch so that ClojureScript builds and nbb
don't load it, and bb lint:no-infra checks this.
Decoding keywordizes object keys. Keywords encode as their full name
(:a/b -> "a/b") and insts as ISO-8601 strings with milliseconds.
JSON encoding for the HTTP transport and for decision handoff. Uses cheshire on the JVM and `js/JSON` in ClojureScript and nbb. cheshire is required only inside the `:clj` branch so that ClojureScript builds and nbb don't load it, and `bb lint:no-infra` checks this. Decoding keywordizes object keys. Keywords encode as their full name (`:a/b` -> "a/b") and insts as ISO-8601 strings with milliseconds.
(decode s)Decodes a JSON string, keywordizing object keys. Throws on invalid JSON.
Decodes a JSON string, keywordizing object keys. Throws on invalid JSON.
(encode x)Encodes Clojure data as a JSON string.
Encodes Clojure data as a JSON string.
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 |