MCPcopy Create free account
hub / github.com/HumbleNet/HumbleNet / process_value

Function process_value

3rdparty/json-parser/examples/test_json.c:85–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85static void process_value(json_value* value, int depth)
86{
87 int j;
88 if (value == NULL) {
89 return;
90 }
91 if (value->type != json_object) {
92 print_depth_shift(depth);
93 }
94 switch (value->type) {
95 case json_none:
96 printf("none\n");
97 break;
98 case json_object:
99 process_object(value, depth+1);
100 break;
101 case json_array:
102 process_array(value, depth+1);
103 break;
104 case json_integer:
105 printf("int: %10" PRId64 "\n", value->u.integer);
106 break;
107 case json_double:
108 printf("double: %f\n", value->u.dbl);
109 break;
110 case json_string:
111 printf("string: %s\n", value->u.string.ptr);
112 break;
113 case json_boolean:
114 printf("bool: %d\n", value->u.boolean);
115 break;
116 }
117}
118
119int main(int argc, char** argv)
120{

Callers 3

process_objectFunction · 0.85
process_arrayFunction · 0.85
mainFunction · 0.85

Calls 3

print_depth_shiftFunction · 0.85
process_objectFunction · 0.85
process_arrayFunction · 0.85

Tested by

no test coverage detected