Distinguish on_string_data and on_key_data

This commit is contained in:
2025-08-04 14:15:49 -04:00
parent 39fe9be4dc
commit bcb5a20f27
5 changed files with 107 additions and 11 deletions

View File

@@ -13,6 +13,11 @@ struct WeaselJsonCallbacks {
* incomplete and there will be another call, potentially with more data
*/
void (*on_string_data)(void *userdata, const char *buf, int len, int done);
/** The key data provided has already been unescaped, unless the
* WeaselJsonRaw flag is used. If `done` is false, this key may be
* incomplete and there will be another call, potentially with more data
*/
void (*on_key_data)(void *userdata, const char *buf, int len, int done);
void (*on_begin_array)(void *userdata);
void (*on_end_array)(void *userdata);
/*If `done` is false, this number may be incomplete and there will be another