You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I currently want to parse a json file while increasing the maximum nesting depth, I'm forced to either:
Patch JSON_TOKENER_DEFAULT_DEPTH at json-c compile time
Copy the entire body of json_object_from_file() into my own application , then adjust its internals to manually create a tokener with json_tokener_parse_ex(depth) and use it instead of the vanilla json_tokener_parse() used in it.
I propose, and if you agree, would be happy to submit a patch that:
Creates a new public function json_object_from_file_ex(const char filename, struct json_tokener tok, enum json_tokener_error *error) - this will have the bulk of the current json_object_from_file() code but will allow an external consumer to supply their own tokener as well as retrieve parsing error code
Update existing json_object_from_file(const char *filename) to be a very lightweight wrapper around the new json_object_from_file_ex() - maintaining 100% signature and behavior
The text was updated successfully, but these errors were encountered:
The public function json_object_from_file_ex() and corresponding testcase have been created in commit baed998. this issue and #166 could be closed. @hawicz
If I currently want to parse a json file while increasing the maximum nesting depth, I'm forced to either:
I propose, and if you agree, would be happy to submit a patch that:
The text was updated successfully, but these errors were encountered: