Closed GoogleCodeExporter closed 9 years ago
This is indeed the expected output with Gson. During serialization, it writes
out the actual object's fields instead of the specified type.
Original comment by inder123
on 20 May 2011 at 9:32
You can register a type hierarchy adapter for your types that limits the output
to the specific set of fields.
Original comment by inder123
on 20 May 2011 at 9:37
Register a type adapter need to know the type - the type of ClassB's field f.
Actually i do not know the type. How do i do?
Original comment by liu78...@gmail.com
on 24 May 2011 at 6:08
Original issue reported on code.google.com by
liu78...@gmail.com
on 18 May 2011 at 5:35