Skip to content

Commit 540597f

Browse files
Improved documentation
1 parent 6995316 commit 540597f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ And in your code
6969

7070
const char * some_json_string = "{\"hello\":\"world\",\"key\":\"value\"}";
7171

72-
int main(int argc, const char * argv[]) {
72+
int main() {
7373
json_object_t *json = json_parse(some_json_string);
7474
printf("Count: %i\n", json->count);
7575
printf("Key: %s\nValue: %s", json->entries[0].type, json->entries[0].value.as_string);
@@ -91,10 +91,10 @@ Value: world
9191

9292
const char * complex_json = "{\"name\":{\"first\":\"John\",\"last\":\"Doe\"},\"age\":21.5}";
9393

94-
int main(int argc, const char * argv[]) {
95-
json_object *json = json_parse(complex_json);
96-
json_object *name_json = json->entires[0].value.as_object;
97-
printf("First name: %s\nLast name: %s\Age: %f",
94+
int main() {
95+
json_object_t *json = json_parse(complex_json);
96+
json_object_t *name_json = json->entires[0].value.as_object;
97+
printf("First name: %s\nLast name: %s\nAge: %f",
9898
name_json->entries[0].value.as_string,
9999
name_json->entries[1].value.as_string,
100100
json->entries[1].value.as_number);

0 commit comments

Comments
 (0)