39#ifndef PROTOCORE_JSON_H
40#define PROTOCORE_JSON_H
44#if PROTOCORE_ENABLE_JSON
73} protocore_json_writer;
88PROTOCORE_INLINE const char *protocore_json_c_str(
const protocore_json_writer *w)
96 protocore_json_writer *w;
104 protocore_json_writer *w;
105} JsonBeginObjectArgs;
110 protocore_json_writer *w;
116 protocore_json_writer *w;
122 protocore_json_writer *w;
128 protocore_json_writer *w;
135 protocore_json_writer *w;
142 protocore_json_writer *w;
149 protocore_json_writer *w;
156 protocore_json_writer *w;
163 protocore_json_writer *w;
169 protocore_json_writer *w;
176 protocore_json_writer *w;
184 protocore_json_writer *w;
192 protocore_json_writer *w;
200 protocore_json_writer *w;
208 protocore_json_writer *w;
215 protocore_json_writer *w;
306 JsonInitArgs init_args;
307 JsonBeginObjectArgs begin_object_args;
308 JsonEndObjectArgs end_object_args;
309 JsonBeginArrayArgs begin_array_args;
310 JsonEndArrayArgs end_array_args;
311 JsonKeyArgs key_args;
312 JsonPutStrArgs put_str_args;
313 JsonPutIntArgs put_int_args;
314 JsonPutUintArgs put_uint_args;
315 JsonPutBoolArgs put_bool_args;
316 JsonPutNullArgs put_null_args;
317 JsonPutRawArgs put_raw_args;
318 JsonKvStrArgs kv_str_args;
319 JsonKvIntArgs kv_int_args;
320 JsonKvUintArgs kv_uint_args;
321 JsonKvBoolArgs kv_bool_args;
322 JsonKvNullArgs kv_null_args;
323 JsonKvRawArgs kv_raw_args;
324 JsonGetStrArgs get_str_args;
325 JsonGetIntArgs get_int_args;
326 JsonGetBoolArgs get_bool_args;
331extern JsonVars JsonV;
336 void (*
const init)(uint8_t *work);
337 void (*
const begin_object)(uint8_t *work);
338 void (*
const end_object)(uint8_t *work);
339 void (*
const begin_array)(uint8_t *work);
340 void (*
const end_array)(uint8_t *work);
341 void (*
const key)(uint8_t *work);
342 void (*
const put_str)(uint8_t *work);
343 void (*
const put_int)(uint8_t *work);
344 void (*
const put_uint)(uint8_t *work);
345 void (*
const put_bool)(uint8_t *work);
346 void (*
const put_null)(uint8_t *work);
347 void (*
const put_raw)(uint8_t *work);
348 void (*
const kv_str)(uint8_t *work);
349 void (*
const kv_int)(uint8_t *work);
350 void (*
const kv_uint)(uint8_t *work);
351 void (*
const kv_bool)(uint8_t *work);
352 void (*
const kv_null)(uint8_t *work);
353 void (*
const kv_raw)(uint8_t *work);
354 void (*
const get_str)(uint8_t *work);
355 void (*
const get_int)(uint8_t *work);
356 void (*
const get_bool)(uint8_t *work);
361void protocore_json_init(uint8_t *work);
362void protocore_json_begin_object(uint8_t *work);
363void protocore_json_end_object(uint8_t *work);
364void protocore_json_begin_array(uint8_t *work);
365void protocore_json_end_array(uint8_t *work);
366void protocore_json_key(uint8_t *work);
367void protocore_json_put_str(uint8_t *work);
368void protocore_json_put_int(uint8_t *work);
369void protocore_json_put_uint(uint8_t *work);
370void protocore_json_put_bool(uint8_t *work);
371void protocore_json_put_null(uint8_t *work);
372void protocore_json_put_raw(uint8_t *work);
373void protocore_json_kv_str(uint8_t *work);
374void protocore_json_kv_int(uint8_t *work);
375void protocore_json_kv_uint(uint8_t *work);
376void protocore_json_kv_bool(uint8_t *work);
377void protocore_json_kv_null(uint8_t *work);
378void protocore_json_kv_raw(uint8_t *work);
379void protocore_json_get_str(uint8_t *work);
380void protocore_json_get_int(uint8_t *work);
381void protocore_json_get_bool(uint8_t *work);
387static const JsonNs Json __attribute__((unused)) = {
388 .init = protocore_json_init,
389 .begin_object = protocore_json_begin_object,
390 .end_object = protocore_json_end_object,
391 .begin_array = protocore_json_begin_array,
392 .end_array = protocore_json_end_array,
393 .key = protocore_json_key,
394 .put_str = protocore_json_put_str,
395 .put_int = protocore_json_put_int,
396 .put_uint = protocore_json_put_uint,
397 .put_bool = protocore_json_put_bool,
398 .put_null = protocore_json_put_null,
399 .put_raw = protocore_json_put_raw,
400 .kv_str = protocore_json_kv_str,
401 .kv_int = protocore_json_kv_int,
402 .kv_uint = protocore_json_kv_uint,
403 .kv_bool = protocore_json_kv_bool,
404 .kv_null = protocore_json_kv_null,
405 .kv_raw = protocore_json_kv_raw,
406 .get_str = protocore_json_get_str,
407 .get_int = protocore_json_get_int,
408 .get_bool = protocore_json_get_bool,
#define JSON_MAX_DEPTH
Maximum object/array nesting depth for the JsonWriter (see json.h).
#define PROTOCORE_INLINE
Linkage for a leaf primitive whose body is cheaper than the call that reaches it.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS