NAME
json.h - Bark zero-dependency JSON parser, iterator, and writer.
SYNOPSIS
Classes
Stack-backed or growable heap-backed JSON writer.
Typedefs
Stack-backed or growable heap-backed JSON writer.
Functions
Escape src into NUL-terminated dst (without surrounding quotes). Returns bytes written.
Look up a top-level object field, returning raw token slice [*start, *start + *len). Returns 1 if found.
Extract and unescape a top-level JSON string field into out. Returns 1 if found.
Extract a top-level signed 64-bit integer field. Returns 1 if found and numeric.
Extract a top-level boolean field (1 for true, 0 for false). Returns 1 if found.
Iterate over object elements inside a bounded JSON array slice [*p, end). Returns 1 per element.
Iterate over string elements inside a bounded JSON array slice [*p, end). Returns 1 per element.
Iterate over top-level key/value pairs inside a bounded JSON object body [*p, end). Returns 1 per pair.
Initialize a JSON writer over fixed stack memory or (if buf == NULL) growable heap memory.
Release heap memory owned by a growable JSON writer.
Emit an opening container delimiter ('{' or '[').
Emit a closing container delimiter ('}' or ']').
Emit an escaped JSON object key followed by ':'.
Emit an escaped JSON string value of length n bytes.
Emit pre-formatted raw JSON bytes verbatim.
Emit a signed 64-bit integer value.
Emit an unsigned 64-bit integer value.
Detailed Description
Bark zero-dependency JSON parser, iterator, and writer.
Zero-dependency JSON escaping, top-level extraction, streaming iteration, and JSON writer.
Performs strictly flat top-level object lookup (never accidentally matching keys inside nested objects or arrays) with full UTF-8 \uXXXX and surrogate-pair unescaping, plus a stack- or heap-backed JSON writer (bark_jw_t).
Typedef Documentation
typedef struct bark_jw bark_jw_t
Stack-backed or growable heap-backed JSON writer. Pass a caller buffer to bark_jw_init() for zero-allocation stack serialization (sets oom on overflow), or pass NULL, 0 for an auto-growing heap buffer released via bark_jw_free().
Author
Generated automatically by Doxygen for Bark from the source code.