jsoncpp icon indicating copy to clipboard operation
jsoncpp copied to clipboard

on RHEL jsoncpp seems to not recognize arrays with integer values

Open raadiy opened this issue 3 years ago • 1 comments

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.

raadiy avatar Jan 03 '22 12:01 raadiy

hi there, I have the same problem. by chance have you found a solution besides converting them to strings? thanks!

MattsProjects avatar Jun 06 '23 07:06 MattsProjects