| 388 | static bool number_is_valid(const char *num); |
| 389 | |
| 390 | JsonNode *json_decode(const char *json) |
| 391 | { |
| 392 | const char *s = json; |
| 393 | JsonNode *ret; |
| 394 | |
| 395 | skip_space(&s); |
| 396 | if (!parse_value(&s, &ret)) |
| 397 | return nullptr; |
| 398 | |
| 399 | skip_space(&s); |
| 400 | if (*s != 0) |
| 401 | { |
| 402 | json_delete(ret); |
| 403 | return nullptr; |
| 404 | } |
| 405 | |
| 406 | return ret; |
| 407 | } |
| 408 | |
| 409 | char *json_encode(const JsonNode *node) |
| 410 | { |
no test coverage detected