mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 04:34:38 +08:00
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
15 lines
543 B
C
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 */
|