Add flags argument to WeaselJsonParser_create

This commit is contained in:
2025-06-25 16:44:31 -04:00
parent 01d81981f7
commit 3e72181bee
7 changed files with 24 additions and 17 deletions

View File

@@ -36,13 +36,18 @@ enum WeaselJsonStatus {
typedef struct WeaselJsonParser WeaselJsonParser;
enum WeaselJsonFlags {
/** Do not unescape strings or write to the supplied buffer at all. */
WeaselJsonRaw = 1,
};
/** Create a parser. Increasing stack size increases memory usage but also
* increases the depth of nested json accepted. `callbacks` and `userdata` must
* outlive the returned parser. Returns null if there's insufficient available
* memory */
WeaselJsonParser *WeaselJsonParser_create(int stackSize,
const WeaselJsonCallbacks *callbacks,
void *userdata);
void *userdata, int flags);
/** Restore the parser to its newly-created state */
void WeaselJsonParser_reset(WeaselJsonParser *parser);