Safe Haskell | None |
---|---|
Language | Haskell2010 |
Attempts to parse to either a result type or a direct report, by using a custom parser. This parser uses Haskell primops to try to avoid allocations. At the end of the day, it's not as fast as Attoparsec, but it's pretty dang fast.
We could not use Attoparsec directly due to the need for differnet error handling. Other libraries with correct error handling behavior do exist, but in order to keep the dependency footprint low, we rolled our own.
Documentation
parseOrReportWith :: (forall parser. JSONParser parser => parser a) -> ByteString -> Either JSONError a Source #
parseOrReport :: FromJSON a => ByteString -> Either JSONError a Source #