| 4 |
4 |
| 5 The parser API is similar to the [properties](properties.h.md) parser, |
5 The parser API is similar to the [properties](properties.h.md) parser, |
| 6 but - due to the nature of JSON - is not allocation-free. |
6 but - due to the nature of JSON - is not allocation-free. |
| 7 |
7 |
| 8 ## Parser |
8 ## Parser |
| |
9 |
| |
10 The following listing shows the JSON parser API. |
| |
11 |
| |
12 > To simplify documentation, we introduce the pseudo-type `AnyStr` with the meaning that |
| |
13 > any UCX string and any C string are supported. |
| |
14 > The implementation is actually hidden behind a macro which uses `cx_strcast()` to guarantee compatibility. |
| |
15 {style="note"} |
| 9 |
16 |
| 10 ```C |
17 ```C |
| 11 #include <cx/json.h> |
18 #include <cx/json.h> |
| 12 |
19 |
| 13 void cxJsonInit(CxJson *json, const CxAllocator *allocator); |
20 void cxJsonInit(CxJson *json, const CxAllocator *allocator); |