[SF 2520679] JSON strings enclosed in single quotes

[SF 2520849] Dynamic/Pair support
This commit is contained in:
Aleksandar Fabijanic
2009-01-19 20:08:04 +00:00
parent 363711ed39
commit c92d329399
11 changed files with 523 additions and 34 deletions

View File

@@ -423,12 +423,12 @@ Var Var::parseArray(const std::string& val, std::string::size_type& pos)
std::string Var::parseString(const std::string& val, std::string::size_type& pos)
{
static const std::string STR_STOP("'\"");
static const std::string STR_STOP("\"");
static const std::string OTHER_STOP(" ,]}"); // we stop at space, ',', ']' or '}'
bool inString = false;
//skip optional ' "
if (val[pos] == '\'' || val[pos] == '"')
if (val[pos] == '"')
{
inString = true;
++pos;