square/moshi ? reverse-engineered prompt

Reverse engineered prompt

Build me a modern JSON library for Java and Kotlin that makes it easy to turn JSON into plain model classes and back again.

I want simple support for reading and writing strings, numbers, booleans, arrays, lists, sets, maps, enums, and regular objects field by field, plus a clean way to plug in custom adapters when I need special formatting. It should work well with both Java classes and Kotlin data classes, and include a good Kotlin friendly API for creating adapters and handling reflection or code generation where needed. Please include a few clear examples, tests, and a small sample showing how someone would parse a JSON object into a class and serialize it back out again. If anything is unclear, look up the current docs online and follow the style people would expect from a solid open source library.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab