MCPcopy Create free account
hub / github.com/antirez/ds4 / json_raw_value

Function json_raw_value

ds4_server.c:380–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378static bool json_skip_value_depth(const char **p, int depth) {
379 json_ws(p);
380 if (**p == '"') {
381 char *s = NULL;
382 bool ok = json_string(p, &s);
383 free(s);
384 return ok;
385 }
386 if (**p == '{') return json_skip_object_depth(p, depth);
387 if (**p == '[') return json_skip_array_depth(p, depth);
388 if (json_lit(p, "true") || json_lit(p, "false") || json_lit(p, "null")) return true;
389 double v = 0.0;
390 return json_number(p, &v);
391}
392
393static bool json_skip_value(const char **p) {

Calls 3

json_wsFunction · 0.85
json_skip_valueFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected