Gson uses only fields private,public,protected
via Java Reflection API
(don't konw why this handler is here)
handler: { ....}
Gson is not doing magic, during serialization to add extra handler filed object in JSON, if it is coming in generated json means you've handler property some where inside destination class, check your code again. If you find it then you can ignore using Expose annotation
@Expose(serialize = false) // don't serialize handler field during serialization process private Handler handler;
Interestingly, the "handler" has a property called "target", which has all the serialized data.
nothing interestingly, means you have handler property inside your destination object, that why you seeing it in generated json.