cereal icon indicating copy to clipboard operation
cereal copied to clipboard

Adding ability to detect a RapidJSON parse error in JSONInputArchive

Open progrematic opened this issue 4 years ago • 0 comments

For my application, I'd like to show an error message when attempting to open a JSONInputArchive on a malformed, or otherwise erroneous json file.

This additional, optional parameter in JSONInputArchive's constructor will allow me to prevent cereal from thworing a RapidJSON exception, and will instead allow me to simply show the user an error message.

This PR is not meant to do anything more than simply expose the RapidJSON document's HasParseError() value

progrematic avatar Oct 31 '20 21:10 progrematic