Comments (6)
So there is no way to exclude some field from serialization/deserialization using this gson extension atm ?
from auto-value-gson.
The exclusion strategy in your example is used by Gson in the ReflectiveTypeAdapterFactory, which isn't used with AutoValue, since auto-value-gson generates it's own TypeAdapter for the type.
To accomplish this, we'd have to create an annotation to be used by auto-value-gson to manually exclude certain parameters from the type adapter.
from auto-value-gson.
Do you plan on adding such an annotation?
from auto-value-gson.
This will be solved when #18 is fixed.
from auto-value-gson.
@rharter gson 2.7 is out. How to exclude fields? Could you give a hint?
from auto-value-gson.
@Rainer-Lang #18 hasn't been fixed yet. Once the original Gson is used by the generated TypeAdapter, we can implement a solution such as the one created by @muddin1
I'm also really looking forward to the fix, let's hope @rharter has the time or someone picks it up
from auto-value-gson.
Related Issues (20)
- Parse json object with varying data types
- RV_RETURN_VALUE_IGNORED findbugs error HOT 3
- Build failed in the generated read method for a generic class HOT 1
- Originating element not set HOT 3
- Generate proguard rules HOT 1
- Generic base types cause compile errors HOT 2
- Allow custom opt-in annotation for factory HOT 2
- AutoValueGsonExtension fails on immutable collections. HOT 1
- "Unable to get public no-arg constructor" simply when adding auto-value-gson dependency HOT 3
- auto-value-gson-from-rharter-generated-invalid-code HOT 6
- What dependency AutoValue annotation is in ? HOT 1
- Non-deterministic generation of TypeAdapterFactory HOT 2
- Issue using @GenerateTypeAdapter with maven HOT 2
- `@Nullable` doesn't work correctly with nested types
- NullPointerException processing ImmutableList.Builder Builder method
- Compilation error in Eclipse/maven
- Handling unrecognized json properties HOT 1
- @AutoValue.Builder generates objects with all fields HOT 2
- 也许这个方案更加好 HOT 1
- Could not instantiate annotation processor 'com.ryanharter.auto.value.gson.AutoValueGsonAdapterFactoryProcessor'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-value-gson.