dungnn / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Exclusion Strategy that uses the field's value #426

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
How to write ExclusionStrategy by field value?
What for to serialize default field values?

Original issue reported on code.google.com by 2morrow...@gmail.com on 27 Mar 2012 at 3:52

GoogleCodeExporter commented 9 years ago
You can accomplish a similar result by registering a TypeAdapter that writes 
'null' for that value. Gson won't serialize nulls by default.

Original comment by limpbizkit on 11 Apr 2012 at 8:37