[Go to site: main page, start]

Documentation

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

Advanced

  • Catch-All Members — capturing unknown JSON keys with @JSONCatchAll
  • Polymorphism — discriminated sealed hierarchies with @JSONTypeInfo and @JSONSubtype