AllenCoder / google-gson

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

GsonBuilder excludeFieldsWithModifiers() not working #324

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create one POJO bean
2. Add one field with transient
3. Set excludeFieldsWithModifiers(Modifier.TRANSIENT) on GsonBuilder and 
convert the pojo to json.

What is the expected output? What do you see instead?
- Transient field was exluded event though i hint gsonbuilder to include it
- I want to include all the transient fields

What version of the product are you using? On what operating system?
gson 1.7.1, Win7

Please provide any additional information below.
Attached is the zipped eclipse project for testing

Original issue reported on code.google.com by techgur...@gmail.com on 12 May 2011 at 1:36

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1096.

Original comment by limpbizkit on 29 Dec 2011 at 7:17

GoogleCodeExporter commented 9 years ago
Transient is excluded by default. Call excludeFieldsWithModifiers() with no 
arguments to enable transient field serialization.

Original comment by limpbizkit on 29 Dec 2011 at 7:18