Johannes Frohnmeyer 47c77a116b | ||
---|---|---|
gson-compile-annotations | ||
gson-compile-core | ||
gson-compile-example | ||
gson-compile-processor | ||
.gitignore | ||
LICENSE.md | ||
README.md | ||
build.gradle.kts | ||
settings.gradle.kts |
README.md
Gson-Compile
A java annotation processor implementing automated type adapter generation for gson-comments. The goal of this AP is to
- Support common features such as getters, setters, fields, constructors
- Support modern language features such as records
- Support json5 through gson-comments
- Be compile-time where possible (ideally compatible with proguard)
Currently supported
- Primitive types
- Adapter generation
- Utility methods
- Strict no-reflection enforcement via
-AgsonCompileNoReflect
- Comments via
@GComment
- Records
- Nested serializable types
- Arrays
- Collections (Sets, Lists, Queues, Deques)
- GPrefer to resolve multiple factories/constructors
TODO
- Setters/field access in read()
- Maps with string, primitive or enum keys
- Date via ISO8601Utils
- Enums
- Support for nested types from libraries
- Static classes (for configs)
Credit
The Gson-Compile processor is based on gsonvalue and value-processor by Eva Tatarka. The API was inspired by kotlinx.serialization by Jetbrains The serialization is powered by my fork of gson by Google