# avaje-jsonb

A reflection-free JSON binding library for Java that generates conversion code at compile time through an annotation processor, as a lighter alternative to Jackson's ObjectMapper or Gson.

avaje-jsonb converts Java objects to and from JSON by generating source code for each annotated class at compile time, rather than reading objects through reflection at runtime, keeping the library itself small before generated code is added. Annotating a class with an @Json annotation triggers the avaje-jsonb-generator annotation processor to write a JSON adapter for it, which is registered automatically through Java's ServiceLoader mechanism without manual wiring; an import annotation covers types the project does not own and cannot annotate directly.

It works with constructors, accessors and various setter styles including records, supports generic types, and provides built-in adapters for Java's core types such as primitives, BigInteger, BigDecimal, the java.time classes, collections and Optionals, alongside Jackson-like annotations for raw values, custom property names, aliases and ignored fields.

It is written in Java and licensed under Apache-2.0.

Website: https://avaje.io/jsonb/
