13 Apr
2013
13 Apr
'13
10:59 a.m.
On 4/12/2013 10:18 AM, Michael Marcin wrote:
On 4/12/13 11:21 AM, TONGARI wrote:
2013/4/12 Michael Marcin
For example:
string raw_json = R"({ data:{ a:"hello", b:"world", c:3, widget:3.5
} })";
This doesn't seem like a valid json, the key must be a quoted string.
In practice you often find json that does not quote keys and I would prefer a useful library to a pedantic one for this task. You could have a strict mode I suppose.
I pretty much just go by what http://jsonviewer.stack.hu/ accepts.
According to both the RFC and the json.org keys should be string values and thus should have quotes. RFC: http://www.ietf.org/rfc/rfc4627.txt JSON.org: http://json.org/ Thank you, Ilya Bobyr