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

Java model _bits property should be transient #214

Closed
RicoYao opened this issue May 29, 2019 · 2 comments
Closed

Java model _bits property should be transient #214

RicoYao opened this issue May 29, 2019 · 2 comments
Assignees

Comments

@RicoYao
Copy link
Contributor

RicoYao commented May 29, 2019

The _bits property in the java models should be declared as private transient int _bits so that the _bits property does not get included when a developer serializes a model to JSON.

@RicoYao RicoYao self-assigned this May 29, 2019
@rahul-malik
Copy link
Collaborator

@RicoYao - Will this prevent it from other serialization methods? For instance if you serialize to disk and read back the same model you'd lose the "is set" capabilities right?

@RicoYao
Copy link
Contributor Author

RicoYao commented May 29, 2019

@rahul-malik My thinking is that if you read back the model and deserialize it through the generated TypeAdapter, then _bits will be set to the expected value again (because the TypeAdapter uses the Builder which sets _bits).

@RicoYao RicoYao closed this as completed Jun 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants