I have the following Json structure.
{ "name": "abc", "city": "holland", "links": [ { "href": "/city/holland/1", "method": "GET", "rel": "edit", "type": "application/holland.citydata+json" }, links": [ { "href": "/city/holland/2", "method": "GET", "rel": "self", "type": "application/holland.citydata+json" }, ],
I parsed this json answer using some parser. Now I want to convert it to a C ++ structure object.
typedef struct json_object; struct json_object { char name; char city; };
I need to read every href value in every link, going through the JasonParser response object. How can I get this in a struct.
Should I use a list of links? How can I do this in a struct?
I would try, please, an example.
source share