java - deserialize json field into plain string with gson -


i trying deserialize json object java bean. main issue facing i'd treat field object of json string plain string, if contains potentially correct json object. json structure this:

{     "type":"user",     "object":{         "id":"1",          ...} } 

how can tell gson ignore object value doesn't deserialized object? i'd mapped plain string field in bean can dispose proper deserialization it, once got type type field.

just declare of type jsonobject

class examplejsonmodel {     @serializedname("type")     public string type;      @serializedname("object")     public jsonobject object; } 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -