I am Parsing Dynamic JSON, so it's more complicated to Decompile using POJO (Model Classes)
Is there any Convenient way to do this, provide suggestions to me.
Here is the Issue
public class Post {
@SerializedName("Resource")
@Expose
private Resource onlineResource;
public Resource getResource() {
return onlineResource;
}
public void setResource(Resource resource) {
this.onlineResource = resource;
}
}
public class Resource {
@SerializedName(value = "_xmlns:xlink",alternate = "xmlns:xlink")
@Expose
private Object xmlnsXlink;
@SerializedName(value = "_xlink:href",alternate = "xlink:href")
@Expose
private Object xlinkHref;
public Object getXmlnsXlink() {
return xmlnsXlink;
}
public void setXmlnsXlink(Object xmlnsXlink) {
this.xmlnsXlink = xmlnsXlink;
}
public Object getXlinkHref() {
return xlinkHref;
}
public void setXlinkHref(Object xlinkHref) {
this.xlinkHref = xlinkHref;
}
}
for Resource Class Sometimes get JSON
like :
{
"Resource": "abcdefgh",
}
alternatively like :
{
"Resource" :
{
"_xmlns:xlink":"xyz",
"_xlink:href":"abc"
},
}
So how could I parse this type of Random(Dynamic) Json?