jsoncpp
jsoncpp copied to clipboard
on RHEL jsoncpp seems to not recognize arrays with integer values
The following is the JSON, which is valid while checking with the online parser at http://json.parser.online.fr/
[{ "op" : "add", "path" : "XYZL_ABCDE", "value" : {"appName" : "TST", "SNO" : [ 100, 101 ]}}]
JSONCPP reports parse error on Redhat enterprise linux on x86 platform. The error string reported by parse() is shown below
- Line 1, Column 82 Missing ',' or ']' in array declaration terminate called after throwing an instance of 'Json::LogicError' what(): in Json::Value::resolveReference(key, end): requires objectValue
If I convert the array values [100, 101] in the above Json string to ["100", "101"] the parse succeeds. Any help in resolving this will be much appreciated. Thanks in advance.
hi there, I have the same problem. by chance have you found a solution besides converting them to strings? thanks!