| 210 | } |
| 211 | |
| 212 | void parse_array(JsonArray &arr, const char *json) |
| 213 | { |
| 214 | CE_ENSURE(NULL != json); |
| 215 | |
| 216 | if (*json == '[') { |
| 217 | json = skip_spaces(++json); |
| 218 | |
| 219 | if (*json == ']') |
| 220 | return; |
| 221 | |
| 222 | while (*json) { |
| 223 | array::push_back(arr, json); |
| 224 | |
| 225 | json = skip_value(json); |
| 226 | json = skip_spaces(json); |
| 227 | |
| 228 | if (*json == ']') |
| 229 | return; |
| 230 | |
| 231 | json = next(json, ','); |
| 232 | json = skip_spaces(json); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | CE_FATAL("Bad array"); |
| 237 | } |
| 238 | |
| 239 | void parse_object(JsonObject &obj, const char *json) |
| 240 | { |