Lines Matching refs:kv
325 struct json_obj_key_value *kv) in obj_next() argument
336 kv->key = NULL; in obj_next()
337 kv->key_len = 0; in obj_next()
338 kv->value = tok; in obj_next()
352 kv->key = tok.start; in obj_next()
353 kv->key_len = (size_t)(tok.end - tok.start); in obj_next()
369 if (!lexer_next(&json->lex, &kv->value)) { in obj_next()
373 return element_token(kv->value.type); in obj_next()
395 static int skip_field(struct json_obj *obj, struct json_obj_key_value *kv) in skip_field() argument
399 if (kv->value.type == JSON_TOK_OBJECT_START || in skip_field()
400 kv->value.type == JSON_TOK_ARRAY_START) { in skip_field()
401 while (field_count > 0 && lexer_next(&obj->lex, &kv->value)) { in skip_field()
402 switch (kv->value.type) { in skip_field()
744 struct json_obj_key_value kv; in obj_parse() local
749 while (!obj_next(obj, &kv)) { in obj_parse()
750 if (kv.value.type == JSON_TOK_OBJECT_END) { in obj_parse()
763 if (kv.key_len != descr[i].field_name_len) { in obj_parse()
767 if (memcmp(kv.key, descr[i].field_name, in obj_parse()
773 ret = decode_value(obj, &descr[i], &kv.value, in obj_parse()
785 ret = skip_field(obj, &kv); in obj_parse()