Liking cljdoc? Tell your friends :D
Clojure only.

com.heavycomputation.cloudflare.internal.json

Just enough JSON to talk to the Cloudflare REST API v4: read the small {success, errors, messages, result} envelopes it returns and write the compact request bodies (and x-amz-free metadata blobs) we send.

This is deliberately not a general JSON library — but it is a correct one for the subset it covers: objects, arrays, strings (with \uXXXX and the usual escapes), numbers (long or double), true/false/null. Keeping it in-house preserves the library's zero-dependency promise, the same way internal.xml does for S3.

read returns objects as maps with string keys (Cloudflare's are camelCase, so callers destructure with :strs); write accepts maps with string or keyword keys.

Just enough JSON to talk to the Cloudflare REST API v4: read the small
`{success, errors, messages, result}` envelopes it returns and write the
compact request bodies (and `x-amz`-free metadata blobs) we send.

This is deliberately *not* a general JSON library — but it is a correct one
for the subset it covers: objects, arrays, strings (with `\uXXXX` and the
usual escapes), numbers (long or double), `true`/`false`/`null`. Keeping it
in-house preserves the library's zero-dependency promise, the same way
`internal.xml` does for S3.

`read` returns objects as maps with *string* keys (Cloudflare's are camelCase,
so callers destructure with `:strs`); `write` accepts maps with string or
keyword keys.
raw docstring

readclj

(read s)

Parse JSON text s into Clojure data (objects as string-keyed maps). Returns nil for nil/blank input. Throws ex-info on malformed JSON.

Parse JSON text `s` into Clojure data (objects as string-keyed maps). Returns
nil for nil/blank input. Throws `ex-info` on malformed JSON.
sourceraw docstring

writeclj

(write v)

Render Clojure data v as a compact JSON string. Maps become objects (string or keyword keys), sequential collections become arrays; keywords/symbols stringify to their name. Anything unrecognized is written as its str.

Render Clojure data `v` as a compact JSON string. Maps become objects (string
or keyword keys), sequential collections become arrays; keywords/symbols
stringify to their name. Anything unrecognized is written as its `str`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close