JSON dosyası şuna benzer:JsonCPP hatası getMemberNames() nasıl düzeltilir?
C++ dosya şuna benzer{
"strings": [
{
"key_one": "value_one!"
},
{
"key_two": "value_two!"
},
]
}
:
Json::Value root;
Json::Reader reader;
bool parsingSuccessful = reader.parse(contents, root);
const Json::Value strings = root["strings"];
std::vector<std::string> list = strings.getMemberNames();
") (strings.getMemberNames" neden hatadır:
Assertion failed: (type_ == nullValue || type_ == objectValue), function getMemberNames, file /projects/.../jsoncpp.cpp,
strings
bir diziDeğeri, ben onu ValueType = 6
alarak onayladı.
ilk cevap benim ideal çözüm, ama bu biçimi için benim PHP kodunu değiştirmek nasıl bulamadı çözümler :) http://stackoverflow.com/questions/11444171/php-to-json-format –