Hello,
I encountered an issue when using Oj as replacement for the default JSON parser via mimic_JSON which is that error handlers in other code (e.g. other gems) which assume that they have to handle a JSON::ParserError error won't be able to handle the situation as they receive an Oj::ParseError.
So my question is: Wouldn't it be reasonable to raise a JSON::ParserError when mimic_JSON was called instead of Oj's error class? Or, as I don't know about internals, somehow ensure that the raised error is a subclass of JSON::ParserError in this situation?
Hello,
I encountered an issue when using Oj as replacement for the default JSON parser via
mimic_JSONwhich is that error handlers in other code (e.g. other gems) which assume that they have to handle aJSON::ParserErrorerror won't be able to handle the situation as they receive anOj::ParseError.So my question is: Wouldn't it be reasonable to raise a
JSON::ParserErrorwhenmimic_JSONwas called instead of Oj's error class? Or, as I don't know about internals, somehow ensure that the raised error is a subclass ofJSON::ParserErrorin this situation?