I'm using libJson (C++ library) for parsing a JSON file. My JSON files looks as follows.
{
"Comany":
{
"name": "Some Company",
"Resources": {
"employees": [
{"name": "John", "id": "23432"},
{"name": "Alex", "id": "32432"}
],
"Computers": [
{"IPAddress": "192.168.1.3", "CPU": "IntelCorei5"},
{"IPAddress": "192.168.1.4", "CPU": "IntelCorei3"}
]
}
}
}
I have structs for Employee and Computer. I would like to create an array of structures.
Any ideas how this can be done with libJson?
Pakal Persist looks like a perfect fit for what you are trying to do.
since there is no reflection in c++ the only extra thing you have to do is to add a member function.