Giovanni Secondo’s Post

Every time you send structured data to an LLM, you're paying for tokens. And if that data is JSON, you're paying for a lot of curly braces, repeated keys, and quotes that add zero information. That's the problem TOON (Token-Oriented Object Notation) solves: a compact, human-readable format that carries the same data as JSON using 30-60% fewer tokens. Field names declared once, indentation instead of braces, minimal quoting. Lossless round-trips to and from JSON. I've been thinking about where things are heading. LLM integrations in enterprise applications are no longer experimental, they're becoming core infrastructure using function calling, tool use, RAG, agentic workflows. All of these involve passing structured data into model context windows, and as these systems scale, token efficiency stops being a nice-to-have and starts being an engineering concern. At the same time, a significant share of enterprise backends run on Spring and Java. That's why I decided to build toon-spring: a Spring Boot library for serializing and deserializing TOON, with the same developer experience you'd expect from Jackson. It's open-sourced, so you can get a look and use it when you want and as you want! toon-spring gives you: → ToonMapper — works like Jackson's ObjectMapper, but for TOON → @ToonField / @ToonIgnore annotations for fine-grained control → Spring Boot auto-configuration with HttpMessageConverter for text/toon → Automatic tabular format detection for uniform object arrays → Configurable delimiters (comma, tab, pipe) and encoding options → Full support for nested objects, primitive arrays, and mixed structures Drop it into your Spring Boot project and you can serialize Java objects to TOON and deserialize TOON into POJOs with a single line of code. This is an early-stage project and there’s a lot of room to grow. I’d love to hear from engineers working at the intersection of Java and AI infrastructure. I’m genuinely looking forward to feedback, discussions, and suggestions from anyone interested in this space, open to constructive ideas and contributions. 🔗 https://lnkd.in/dXQNQ5Hm #Java #SpringBoot #OpenSource #LLM #AI #TOON #SoftwareEngineering

To view or add a comment, sign in

Explore content categories