-
Notifications
You must be signed in to change notification settings - Fork 706
Json id ns lbaf #2817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Json id ns lbaf #2817
Conversation
util/json.h
Outdated
| void json_object_add_nprix64(struct json_object *o, const char *k, uint64_t v); | ||
| void json_object_add_uint_0nx(struct json_object *o, const char *k, __u32 v, int width); | ||
| void json_object_add_0nprix64(struct json_object *o, const char *k, uint64_t v, int width); | ||
| void json_object_add_format(struct json_object *o, const char *k, const char *format, ...); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to stick to the above pattern and use the name as final postfix, so in this case just string. There is also already one helper which is called .._value_string. So this would make more sense to me.
json_object_add_string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed as suggested. Thank you.
|
I was wonder about the second patch how we deal with the verbose flag and json. it seems in most cases we are actually replace the output with something else. So the verbose flag is not extending the existing output. I think it would make more sense to handle it as we do it in the stdout case, where we leave the orignal output and just extend it. Though this is something we should do in a different patch and verify that we don't break anyone. I am fine with the second patch for the time being. |
b1292dd to
a2427e3
Compare
|
About the second patch understood your comment so for now just remaind the changes but just rebased with the first patch. Thank you. |
This is to add a format string into the json object. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
Also add lbaf and in_use outputs for both normal and verbose modes. Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
|
Thanks! |
No description provided.