http://qiita.com/7of9/items/41d8b9adb06a6e930058
にて書き出したファイルからの読み込み
"name"`というキーの値を取得する。
# include <DBXJSON.hpp> // for JSON
# include <memory> // for unique_ptr
...
std::unique_ptr<TStringList> slread(new TStringList);
slread->LoadFromFile(L"test.json");
TJSONObject *jsonObj = new TJSONObject();
String jsonKey, jsonValue;
TJSONPair *pairObj;
for(int li=0; li < slread->Count; li++) { // file line index
String jsonText = slread->Strings[li];
jsonObj = dynamic_cast<TJSONObject*>(TJSONObject::ParseJSONValue(jsonText));
pairObj = jsonObj->Get(L"name");
if (pairObj != NULL) {
jsonValue = pairObj->JsonValue->Value();
ShowMessage(L"name:" + jsonValue);
}
}
jsonObj->Free();
こちらが参考になった。
http://www.gesource.jp/weblog/?p=4567