Forráskód Böngészése

Add %T to the API ref

PUBLISHED_FROM=f6679ea960b3aa0bc9142515548835ee0f78af67
Sergey Lyubka 9 éve
szülő
commit
54ff938749
1 módosított fájl, 4 hozzáadás és 3 törlés
  1. 4 3
      docs/api/json_scanf.md

+ 4 - 3
docs/api/json_scanf.md

@@ -24,12 +24,13 @@ Scan JSON string `str`, performing scanf-like conversions according to `fmt`.
       json_scanf(str, strlen(str), "{c: %B}", &value);
       ```
 3. Several extra format specifiers are supported:
-   - %B: consumes `int *`, expects boolean `true` or `false`.
-   - %Q: consumes `char **`, expects quoted, JSON-encoded string. Scanned
+   - `%B`: consumes `int *`, expects boolean `true` or `false`.
+   - `%Q`: consumes `char **`, expects quoted, JSON-encoded string. Scanned
       string is malloc-ed, caller must free() the string. Scanned string
       is a JSON decoded, unescaped UTF-8 string.
-   - %M: consumes custom scanning function pointer and
+   - `%M`: consumes custom scanning function pointer and
       `void *user_data` parameter - see json_scanner_t definition.
+   - `%T`: consumes `struct json_token *`, fills it out with matched token.
 
 Return number of elements successfully scanned & converted.
 Negative number means scan error.