Documentation
Welcome to the Latte json documentation. json is a compile-time JSON library: you annotate a record, class, or sealed interface with @JSON, and an annotation processor generates a companion serializer/deserializer for it during compilation. There’s no reflection, and nothing from the library ends up on your runtime path.
Getting Started
- Getting Started — wire up the processor, annotate your first type, and round-trip it
- Supported Types — the scalar type mapping, collections, enums, and nested objects
Defining Types
- Records, Classes & Beans — the three kinds of
@JSONtypes and how each is read and written - Field Customization —
@JSONFieldand the@JSONoutput options (omitNulls,strict) - Naming Strategies — converting Java names to JSON keys
- Dates & Times — ISO strings, custom patterns, and epoch integers
Advanced
- Catch-All Members — capturing unknown JSON keys with
@JSONCatchAll - Polymorphism — discriminated sealed hierarchies with
@JSONTypeInfoand@JSONSubtype