TNT/include/json_text.h
m1ngsama 2402c70d6f feat: add module foundation runtime
Add validated input buffering, shared JSON helpers, the tnt.module.v1 protocol helpers, and an opt-in external-process module runtime behind TNT_MODULE_PATHS.

Closes #52
2026-06-04 22:48:21 +08:00

15 lines
543 B
C

#ifndef JSON_TEXT_H
#define JSON_TEXT_H
#include "common.h"
void tnt_json_append_string(char *buffer, size_t buf_size, size_t *pos,
const char *text);
/* Extract a top-level JSON string field from a single JSON object.
* Returns false for malformed JSON, missing key, non-string value, or output
* overflow. Unknown nested objects and arrays are skipped. */
bool tnt_json_get_string_field(const char *json, const char *key,
char *out, size_t out_size);
#endif /* JSON_TEXT_H */