rharter / auto-value-gson

AutoValue Extension to add Gson De/Serializer support
Apache License 2.0
607 stars 103 forks source link

Add support for custom JsonSerializer and JsonDeserializer #173

Closed rubixhacker closed 5 years ago

rubixhacker commented 6 years ago

Gson 2.8.1 add the ability to provide an object in the @JsonAdapater that implemented JsonSerializer and/or JsonDeserializer. Right now @GsonTypeAdapter only accepts TypeAdapters. It would be great if GsonTypeAdapter was expanded to accept JsonSerializer/JsonDeserializer or a new annotation was added to support this.

ZacSweers commented 5 years ago

For the sake of keeping things simple, I think we're going to keep it at just TypeAdapters for now. PRs welcome