Allow ExclusionStrategy by field value.
See original GitHub issueWhen implementing the ExclusionStrategy, in shouldSkip* methods we have access
to the fields attributes but not the fields values.
Might be usefull to be able to filter based on some specific values. So the
idea here is to enhance the ExclusionStrategy to pass not just FieldAttributes
but also the source object itself.
Original issue reported on code.google.com by jean-m...@spaggiari.org
on 3 Jul 2012 at 6:30
Issue Analytics
- State:
- Created 9 years ago
- Comments:11
Top Results From Across the Web
Excluding certain fields from Serialization based on value in ...
The way to achieve this is by creating custom serializer for the class in question. After allowing Gson to create a JSON object...
Read more >Exclusion on Value. (Kind of ExclusionStrategy)
Hi, With the interface ExclusionStrategy it's possible to exclude a field to be serialized based on it's title. But is there a way...
Read more >Exclude Fields from Serialization in Gson - Baeldung
ExclusionStrategy. It allows us to define (externally or with an Anonimous Inner Class) a strategy to instruct the GsonBuilder whether to ...
Read more >Gson Builder — Exclusion Strategies - Future Studio
Gson calls them ExclusionStrategies . Of course, you have to set them via GsonBuilder . Before we go to the specific implementation, let's...
Read more >ExclusionStrategy (Gson 2.8.2 API) - javadoc.io
A strategy (or policy) definition that is used to decide whether or not a field or top-level class should be serialized or deserialized...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1. I would be great to shrink the JSON and parsing time by having a default value that does not need to be serialized at all, and the parsing code knows what the value is.
Original comment by
Maaarti...@gmail.com
on 13 May 2014 at 3:23