The following code doesn't assert anymore with version 1.9.8
#include <jsoncpp/json/json.h>
#include <iostream>
int main() {
Json::Value root;
Json::Reader reader;
std::string s = R"(
"a": "b"
)";
if (!reader.parse(s, root))
abort();
std::cerr << "parse OK" << std::endl;
auto a = root["a"]; // Asserts at json_value.cpp:1136
//
}
parse OK
terminate called after throwing an instance of 'Json::LogicError'
what(): in Json::Value::resolveReference(key, end): requires objectValue,
but found stringValue
** Changed in: libjsoncpp (Ubuntu)
Status: New => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1331904
Title:
Assertion with invalid JSON string
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libjsoncpp/+bug/1331904/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs