validate_jsmn_parse_output * * @brief Validates the result of jsmn_parse. * * @desc LIBJMSN is a small fast library, not a * comprehensive library. * * This simply means that LIBJSMN will accept a * *lot* of very strange text that is technically * not JSON. * * For example, LIBJSMN would accept the strings * `{"1" "2" "3" "4"}` and `["key": 1 2 3 4]` as valid. * * This can lead to st
| 462 | * `jsmn_parse`, false otherwise. |
| 463 | */ |
| 464 | static bool |
| 465 | validate_jsmn_parse_output(const char *buf, |
| 466 | const jsmntok_t *p, const jsmntok_t *end) |
| 467 | { |
| 468 | bool valid = true; |
| 469 | |
| 470 | while (p < end && valid) |
| 471 | p = validate_jsmn_datum(buf, p, end, &valid); |
| 472 | |
| 473 | return valid; |
| 474 | } |
| 475 | |
| 476 | /*----------------------------------------------------------------------------- |
| 477 | JSMN Result Validation Ends |
no test coverage detected