I have a JSON object with a wrapper which contains information about the service it came from. Before parsing the object I really care about I would like to take off the wrapper and then just parse the object.
How do I turn this JSON object:
{"object":{"id_object": 1, "description": "Black" }, "origin":"colors"}
Into this:
{"id_object": 1, "description": "Black"}
I am using GSON as JSON parser, but if any other will give me the functionallity, I can change the library.
Thanks in advance.
Since the whole thing is a blob of json, it doesn’t make sense to ‘unwrap it.’ Just parse the whole thing, and and grab the value of the ‘object’ key, and go along from there.