how to validate json object before calling dump() #1748
Labels
kind: question
state: stale
the issue has not been updated in a while and will be closed automatically soon unless it is updated
I'm having an issue with figuring out a method of detecting if a nlohmann:json object is valid for dump(). Currently, I've been experiencing a bug with dump() that is causing a crash with a malformed json object after parsing.
My answer to this would be to check if json::accept(json_object) would be valid before dumping to prevent a crash, but you can't do that unless you pass an input_adapter to json::accept, which is a string and not a json object.
The text was updated successfully, but these errors were encountered: