My idea is to replace occupation
with an own class. Something like myMeta or whatever you want to call it(be aware in your case like the xml says: meta). This class should cotain the field occupation:
public class Meta { private String occupation; }
After that you only have to add a new field of your new class e.g. myMeta
to myPojo
. Something like this:
public class MyPojo { private String name; private int age; private Meta meta; }
this should avoid
that occupation is wrapped within meta element
Hope that helps!