Or make a constructor where you can pass a GsonBuilder, because if you want to create Json String, it will serialize EVERY field and you cannot prevent it, except make it "transient".
Or you could use new GsonBuilder().excludeFieldsWithoutExposeAnnotation() and you have to add @expose to your fields.
Or make a constructor where you can pass a GsonBuilder, because if you want to create Json String, it will serialize EVERY field and you cannot prevent it, except make it "transient".
Or you could use new GsonBuilder().excludeFieldsWithoutExposeAnnotation() and you have to add @expose to your fields.