Half the tokens.
Every value back.
The token-efficient data layer for LLM apps. Send models half the tokens, get exact numbers back, and read every byte in Java, Python or TypeScript.
pip install ./sdk/python
[{"id":1001,"name":"Ada Lovelace","role":"admin","city":"London","active":true},
{"id":1002,"name":"Grace Hopper","role":"editor","city":"New York","active":true},
{"id":1003,"name":"Alan Turing","role":"viewer","city":"London","active":false},
{"id":1004,"name":"Katherine Johnson","role":"editor","city":"Hampton","active":true},
{"id":1005,"name":"Edsger Dijkstra","role":"viewer","city":"Austin","active":false}]
@id+,name,role,city,active 1001,Ada Lovelace,admin,London,true 1,Grace Hopper,editor,New York,true 1,Alan Turing,viewer,London,false 1,Katherine Johnson,editor,Hampton,true 1,Edsger Dijkstra,viewer,Austin,false
id+ stores each id as the step from the row above.
Smallest prompt on 60 production payloads.
Tables, nested API responses, logs, time series and agent traces. Same data, every format, one tokenizer.
See every caseChecked on TOON's own data. We reproduce TOON's published counts token for token, and JDogo comes in 7.9% under TOON and under CSV. How
Put a number on it.
Your traffic, your model price. The reduction starts at the benchmark average; measure your own payload in the playground for an exact figure.
Learn it in ten seconds.
One header line says what every column holds. Rows carry only what changes. No schema file, no build step.
@- Column names, written once.
id+- Whole numbers stored as the step from the row above.
sku^SKU-+- A shared prefix, lifted out, then the step.
status=open- Same in every row, so no cell at all.
~""- Null and empty string stay different.
@id+,sku^SKU-+,status=open,city,qty,note 5001,8100,Cairo,3,~ 1,7,Lima,12,fragile 1,7,Oslo,5,"" 1,7,Cairo,5,fragile 1,7,Lima,40,"rush, cold chain" 1,7,Cairo,7,~
Decodes to the exact JSON it came from: same keys, same order, same values.
Stop asking models to count.
With ask(), the model never sees your rows. It reads a short schema card, writes a one-line query, and the SDK computes the exact answer locally.
- Far smaller prompts on big tables
- Model text is parsed, never executed
- Falls back to rows when a question needs them
How many London users are active?
count where city = "London" and active = true
1
Counting and totals questions, three models, recorded runs.
Give your agents exact answers.
JDogo ships an MCP server. Claude Desktop, Cursor and any MCP client get eight tools: compress data, build prompts, summarise tables, and compute counts and totals locally instead of guessing.
Set up the MCP server{
"mcpServers": {
"jdogo": {
"command": "java",
"args": ["-jar", "jdogo-cli-2.1.0.jar", "mcp", "start"]
}
}
}
jdogo_computeexact counts, sums, averagesjdogo_promptthe measured prompt layoutjdogo_schema_carda table in a few hundred tokensjdogo_compressjdogo_decodelossless both waysjdogo_tokensexact token countsjdogo_diffjdogo_patchsend only what changed
Write in one language. Read in any.
Java, Python and TypeScript write the same format and decode each other's output exactly. Every pair is checked on every build.
| Written by | Java reads | Python reads | TypeScript reads |
|---|---|---|---|
| Java writes | ✓ | ✓ | ✓ |
| Python writes | ✓ | ✓ | ✓ |
| TypeScript writes | ✓ | ✓ | ✓ |
203 shared reference vectors and thousands of fuzzed values per build, plus a jdogo command in all three.
- pandas
- FastAPI
- Flask
- Express
- Next.js
- Vercel AI SDK
- LangChain
- Spring Boot
- Spring AI
- MCP
- Jackson
- llama.cpp grammars
import jdogo text = jdogo.dumps(rows) # JSON value in, JDogo text out rows = jdogo.loads(text) # exactly the same value back prompt = jdogo.format_query_prompt("Who is in London?", rows)
import { stringify, parse, ask } from "jdogo"; const text = stringify(rows); // JDogo text const back = parse(text); // identical value const r = await ask("How many are active?", rows, callModel);
import com.jdogo.core.doc.DocCodec; import com.jdogo.ai.JDogoAI; String text = DocCodec.encode(orders); // records, maps, lists Object back = DocCodec.decode(text); // lossless var r = JDogoAI.ask("Total revenue?", orders, llm);
Built to be trusted with production data.
Lossless, proven
200 of 200 test cases come back exactly, including 50-digit decimals, special floats and delimiter storms. TOON: 192. Avro: 161.
Hostile input, handled
Depth and size limits on by default. Every decoder is fuzzed with broken and malicious text and must fail cleanly.
No migration
Plain JSON is valid JDogo. Readers accept both, so you can switch one service at a time.
Where it pays off.
Big wins
- Lists of records: API results, query rows, logs, events
- RAG context and tool-call results sent to a model
- Service-to-service payloads, smallest once gzipped
Keep JSON for
- Payloads under about 100 tokens
- Clients you can't add a JDogo reader to
Paste your JSON. See the cut.
Every format, real token counts, exact round-trip checks, in your browser.
Open the playground