Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Conversation

@gao-feng
Copy link
Contributor

Signed-off-by: Gao feng omarapazanadi@gmail.com

src/parse.c Outdated
strlen(s) == (size_t)(t->end - t->start));
}

void hyper_print_unknown_section(char *json, jsmntok_t *t)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about use the name unknown key or unknown field?

dprintf(stdout, "in maps incorrect %s\n",
json_token_str(json, &toks[i]));
hyper_print_unknown_section(json, &toks[i]);
return -1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, the best way to handle unknown keys is ignoring them.
let runv handle the api compatibility.
it will make the api-updating easier.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore is good, but should we print out the debug message? If yes, this pr is still needed

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
@laijs laijs merged commit f6e080e into hyperhq:master Dec 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants