Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Convert Java to JSON/TOON and back. Supports complex object graphs, cyclic references, and TOON format for 40-50% LLM token savings
| Date | Stars |
|---|---|
| 2026-07-31 | 389 |
| 2026-08-06 | 389 |
| 2026-08-18 | 388 |
| 2026-08-22 | 388 |
| 2026-09-20 | 388 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<p align="center">
<img src="infographic.jpeg" alt="json-io infographic - JSON5, TOON, and Core Capabilities" width="100%" />
</p>
<p align="right"><sub>Infographic by <a href="https://github.com/glaforge">Guillaume Laforge</a></sub></p>
<div align="center">
<p>
<a href="https://central.sonatype.com/search?q=json-io&namespace=com.cedarsoftware">
<img src="https://badgen.net/maven/v/maven-central/com.cedarsoftware/json-io" alt="Maven Central" height="20" />
</a>
<a href="http://www.javadoc.io/doc/com.cedarsoftware/json-io">
<img src="https://javadoc.io/badge/com.cedarsoftware/json-io.svg" alt="Javadoc" height="20" />
</a>
<a href="https://github.com/jdereg/json-io/blob/master/LICENSE">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License" height="20" />
</a>
<img src="https://img.shields.io/badge/JDK-1.8%2B-orange" alt="JDK 1.8+" height="20" />
<a href="https://json5.org/">
<img src="https://img.shields.io/badge/JSON5-Full%20Support-brightgreen" alt="JSON5" height="20" />
</a>
<a href="https://toonformat.dev/">
<img src="https://img.shields.io/badge/TOON-Read%2FWrite-blueviolet" alt="TOON" height="20" />
</a>
</p>
<p>
<a href="https://github.com/jdereg/json-io">
<img src="https://img.shields.io/github/stars/jdereg/json-io?style=social" alt="GitHub stars" />
</a>
<a href="https://github.com/jdereg/json-io/fork">
<img src="https://img.shields.io/github/forks/jdereg/json-io?style=social" alt="GitHub forks" />
</a>
</p>
</div>
LLM applications waste 40-50% of their token budget on JSON syntax overhead — braces, brackets, quotes, and commas that carry zero semantic information. **json-io** is a Java serialization library that reads and writes **JSON**, **JSON5**, and **[TOON](https://toonformat.dev/)** (Token-Oriented Object Notation) — a format that strips that overhead while preserving full data fidelity. It also handles what Jackson/Gson cannot: cyclic object graphs, automatic polymorphic types, and zero-config serialization of 60+ built-in Java types.
Featured on [json.org](http://json.org) and [Baeldung](https://www.baeldung.com/java-json-toon-format-libraries). See the [interactive JSON vs TOON comparison](https://jdereg.github.io/json-io/compare/).
## Quick Start
```java
// JSON
String json = JsonIo.toJson(myObject);
MyClass obj = JsonIo.toJava(json).asClass(MyClass.class);
// JSON5
String json5 = JsonIo.toJson(myObject, new WriteOptionsBuilder().json5().build());
// TOON (~40-50% fewer tokens than JSON)
String toon = JsonIo.toToon(myObject);
MyClass obj = JsonIo.fromToon(toon).asClass(MyClass.class);
// Standard JSON (Jackson-compatible output — no @type, no @id/@ref, stringified map keys)
String json = JsonIo.toJson(myObject, new WriteOptionsBuilder().standardJson().build());
```
## Installation
**Gradle**
```groovy
implementation 'com.cedarsoftware:json-io:4.110.0'
```
**Maven**
```xml
<dependency>
<groupId>com.cedarsoftware</groupId>
<artifactId>json-io</artifactId>
<version>4.110.0</version>
</dependency>
```
Latest version: [](https://central.sonatype.com/artifact/com.cedarsoftware/json-io)
---
<details>
<summary><strong style="font-size:1.4em">JSON</strong></summary>
### Usage
```java
// Write JSON
String json = JsonIo.toJson(myObject);
JsonIo.toJson(outputStream, myObject, writeOptions);
// Read JSON to typed Java objects
Employee emp = JsonIo.toJava(json).asClass(Employee.class);
Employee emp = JsonIo.toJava(inputStream, readOptions).asClass(Employee.class);
// Read JSON to Maps (no classes needed)
Map map = JsonIo.toMaps(json).asMap();
// Generic types
List<Employee> list = JsonIo.toJava(json).asType(new TypeHolder<List<Employee>>(){});
```
### Standard JSON Mode — Jackson Compatible
**One flag flips json-io's output to match Jackson.** Use `standardJson()` to produce Excerpt of 29,518 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:8ab196c3afe4a32c, llm:Repository description: "Convert Java to JSON/TOON and back. Supports complex object graphs, cyclic references, and TOON format for 40-50% LLM token savings" (Java library for serializing Java objects to JSON/TOON)
matched fp:8ab196c3afe4a32c, llm:Repository description: "Convert Java to JSON/TOON and back. Supports complex object graphs, cyclic references, and TOON format for 40-50% LLM token savings" (Java library for serializing Java objects to JSON/TOON)