JSON ファイルの解析に libJson (C++ ライブラリ) を使用しています。私のJSONファイルは次のようになります。
{
"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"}
]
}
}
}
Employee と Computer の構造体があります。構造体の配列を作成したいと思います。
libJsonでこれを行う方法はありますか?