Closed GoogleCodeExporter closed 9 years ago
I don't think we want to support this in Gson directly. I think @Expose was a
mistake, but now we are stuck with it :-). This is really easy for you to do
yourself if you are using Gson 1.7 or later.
Instead, what I recommend is that you write your own Exclusion Strategies for
serialization and deserialization. Then you would create your Gson instance as
follows:
Gson gson = new GsonBuilder()
.addSerializationExclusionStrategy(new MySerializationExclusionStrategy())
.addDeserializationExclusionStrategy(new MyDeserializationExclustionStrategy())
.create();
Original comment by joel.leitch@gmail.com
on 19 Apr 2011 at 9:44
Yeah, I (we) already use that, but we thought we could help a little.
Anyway, if you suddenly want to add it in gson, the patch is here ;-).
Original comment by julien.d...@clever-cloud.com
on 20 Apr 2011 at 7:15
Original issue reported on code.google.com by
julien.d...@clever-cloud.com
on 18 Apr 2011 at 10:13Attachments: