[Cppcms-users] Dots in JSON Value keys
Brought to you by:
artyom-beilis
From: Julian P. <ju...@wh...> - 2010-10-13 17:24:59
|
Hallo, as the JSON RFC does not state that dots in names are forbidden, cppcms::json::value should provide a way to request such named values, as in: { "dotted.key": "value" } Currently, a json::value.find("dotted.key") would return an undefined JSON value, because it would look whether "dotted" has an object as value and this object has a name "key". If you don't want to remove the possibility to access an sub-object via a dotted path, perhaps there would be a way to escape a path like in std::string path = "dotted\\.key"; And if you mean a backslash, "dotted\\\\.key" Thanks, Julian |