| 245 | } |
| 246 | |
| 247 | ReturnCode json_read_object_begin( |
| 248 | std::istream* input) { |
| 249 | TokenType token; |
| 250 | std::string token_data; |
| 251 | if (auto rc = json_parse(input, &token, &token_data); !rc) { |
| 252 | return rc; |
| 253 | } |
| 254 | |
| 255 | if (token == JSON_OBJECT_BEGIN) { |
| 256 | return OK; |
| 257 | } else { |
| 258 | return {ERROR, "expected a JSON object"}; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | ReturnCode json_read_string( |
| 263 | std::istream* input, |
no test coverage detected