Browse Source

Fix https://github.com/cesanta/frozen/pull/31

CL: Fix https://github.com/cesanta/frozen/pull/31

PUBLISHED_FROM=3fd29f764e786aca536be5c166137a35bc7775d1
Sergey Lyubka 7 years ago
parent
commit
fc431f36d1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -81,7 +81,7 @@ Example - scan arbitrary JSON string:
     struct json_token t;
     struct json_token t;
     int i;
     int i;
     printf("Parsing array: %.*s\n", len, str);
     printf("Parsing array: %.*s\n", len, str);
-    for (i = 0; json_scanf_array_elem(str, len, ".x", i, &t) > 0; i++) {
+    for (i = 0; json_scanf_array_elem(str, len, "", i, &t) > 0; i++) {
       printf("Index %d, token [%.*s]\n", i, t.len, t.ptr);
       printf("Index %d, token [%.*s]\n", i, t.len, t.ptr);
     }
     }
   }
   }