-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
From http://pocoproject.org/forum/viewtopic.php?f=12&t=6140&sid=66fde97c7f5b4f054edf3d0f53e3b6b7
postby dedvalson » Mon Mar 17, 2014 11:24 am
The following code produces incorrect output.
JSON::Object json(true);
json.set ("foo", 0);
json.set ("bar", 0);
json.set ("baz", 0);
stringstream ss;
json.stringify(ss);
Here is the output:
"{"bar":0,"bar":0,"bar":0}
This code works (false in the constructor):
JSON::Object json(false);
json.set ("foo", 0);
json.set ("bar", 0);
json.set ("baz", 0);
stringstream ss;
json.stringify(ss);
So does this (different values for the keys):
JSON::Object json(true);
json.set ("foo", 1);
json.set ("bar", 2);
json.set ("baz", 3);
stringstream ss;
json.stringify(ss);
Reactions are currently unavailable