Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a magic field in a class to specify the default type adapter #564

Closed
GoogleCodeExporter opened this issue May 5, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

I want to specify the JSON serialization/deserialization semantics within my 
class itself, through a static field. 

class A {
  private static final TypeAdapter<A> GSON_TYPE_ADAPTER = .....
}

The big value is that all users of my class get automatic benefit of type 
adapter, they don't need to remember to register it.

Original issue reported on code.google.com by inder123 on 8 Mar 2014 at 8:17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant