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
| 509 | * `jsmn_parse`, false otherwise. |
| 510 | */ |
| 511 | static bool |
| 512 | validate_jsmn_parse_output(const char *buf, |
| 513 | const jsmntok_t *p, const jsmntok_t *end) |
| 514 | { |
| 515 | bool valid = true; |
| 516 | |
| 517 | while (p < end && valid) |
| 518 | p = validate_jsmn_datum(buf, p, end, &valid); |
| 519 | |
| 520 | return valid; |
| 521 | } |
| 522 | |
| 523 | /*----------------------------------------------------------------------------- |
| 524 | JSMN Result Validation Ends |
no test coverage detected