How to get json values after json_tokener_parse()?
问题 I have the following code #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <json/json.h> int main(int argc, char **argv) { json_object *new_obj; char buf[] = "{ \"foo\": \"bar\", \"foo2\": \"bar2\", \"foo3\": \"bar3\" }" new_obj = json_tokener_parse(buf); printf("The value of foo is %s" /*What I have to put here?*/); printf("The value of foo2 is %s" /*What I have to put here?*/); printf("The value of foo3 is %s" /*What I have to put here?*/); json_object