bark_jw(3)Bark

NAME

bark_jw - Stack-backed or growable heap-backed JSON writer.

SYNOPSIS

#include <json.h>

Public Attributes

char * buf
size_t len
size_t cap
int need_comma
int oom
int owned

Detailed Description

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().

Member Data Documentation

char* bark_jw::buf

NUL-terminated JSON output buffer.

size_t bark_jw::cap

Buffer capacity in bytes.

size_t bark_jw::len

Current byte length excluding NUL.

int bark_jw::need_comma

Internal comma state between sibling entries.

int bark_jw::oom

Non-zero if buffer overflowed or allocation failed.

int bark_jw::owned

Non-zero if buf is heap-owned by the writer.

Author

Generated automatically by Doxygen for Bark from the source code.