| 144 | } |
| 145 | |
| 146 | bool json_to_bool(const char *buffer, const jsmntok_t *tok, bool *b) |
| 147 | { |
| 148 | if (tok->type != JSMN_PRIMITIVE) |
| 149 | return false; |
| 150 | if (memeqstr(buffer + tok->start, tok->end - tok->start, "true")) { |
| 151 | *b = true; |
| 152 | return true; |
| 153 | } |
| 154 | if (memeqstr(buffer + tok->start, tok->end - tok->start, "false")) { |
| 155 | *b = false; |
| 156 | return true; |
| 157 | } |
| 158 | return false; |
| 159 | } |
| 160 | |
| 161 | bool json_hex_to_be32(const char *buffer, const jsmntok_t *tok, be32 *val) |
| 162 | { |
nothing calls this directly
no test coverage detected