Skip to content
Advertisement

Tag: nested-object

Gson showing nested Object as null

Im trying to deserialize objects into JSON, one object contains a nested object. I created an instance of both the nested object (UserAddress)and the one containing it (UserObjectWithNestedObject). However, when I serialize, the nested object is null. So I ran the program in debugger mode to see when it goes null. It seems to be null when I use it

Advertisement