JDogo
Open playground

Choosing a mode

Four ways to write the same data. One reader decodes them all.

You are…UseWhy
Asking a model about dataask() for counts and totals, the prompt builder for the restExact answers; prompts tuned on live runs
Moving data between servicesCompact, with gzip or brotliSmallest format once compressed
Writing logs, fixtures or docsReadableFull values, no steps or ^ marks
Exchanging data with a declared formatTypedSelf-identifying first line
Writing or reading huge tablesStreamingOne row at a time, flat memory

Compact

The default. Uses every header form: steps, prefixes, dictionaries, constants and ^ repeats.

jdogo.dumps(data)                     # or jdogo.doc_encode(data)

Readable

Full keys and values, nothing hoisted or repeated. About 16% more tokens than compact and still about 43% fewer than JSON across the 200 test cases.

jdogo.dumps(data, mode="readable")    # or jdogo.encode_readable(data)

Typed

A first line !JDOGO/2 @doc, then a compact document. Use it when a receiver must know what it's reading before it parses.

jdogo.dumps(data, mode="typed")

Compress for transfer

JDogo already removes repeated keys, but gzip still shortens values that repeat across rows. Gzipped, the 200 test cases take 332 KB in JDogo, against 399 KB in TOON, 417 KB in binary Avro and 480 KB in JSON. Set Content-Encoding: gzip or br as you would for JSON.

Uncompressed, binary Avro with a schema agreed in advance is smaller on some payloads, such as agent traces and delimiter-heavy text.

Reading: one call for everything

jdogo.loads, parse and DocCodec.decode read compact, readable and typed documents and plain JSON. Python and TypeScript also fall back to the 1.x format, so old data keeps working.

Streaming

For tables too big to hold in memory, see Streaming. Streamed output is larger than dumps output, because the writer chooses cells before it has seen later rows.