| 1241 | } |
| 1242 | |
| 1243 | void Parser::readString() |
| 1244 | { |
| 1245 | if (json.at(cursor) != '"') |
| 1246 | return; |
| 1247 | |
| 1248 | std::string str; |
| 1249 | |
| 1250 | ++cursor; |
| 1251 | |
| 1252 | char c1 = '\0', c2 = '\0'; |
| 1253 | for (; cursor < jsonSize; ++cursor) |
| 1254 | { |
| 1255 | c2 = json.at(cursor); |
| 1256 | |
| 1257 | if (c1 != '\\' && c2 == '"') |
| 1258 | { |
| 1259 | break; |
| 1260 | } |
| 1261 | |
| 1262 | str += c2; |
| 1263 | |
| 1264 | c1 = c2; |
| 1265 | } |
| 1266 | |
| 1267 | data.push(MakePair(Value::VT_STRING, str)); |
| 1268 | } |
| 1269 | bool Parser::interpretValue(const std::string &value) |
| 1270 | { |
| 1271 | std::string upperValue(value.size(), '\0'); |