api-builder-0.1.0.1: Library for easily building REST API wrappers in Haskell

Safe HaskellNone

APIBuilder.Decoding

Synopsis

Documentation

decode :: (FromJSON a, FromJSON e) => ByteString -> Either (APIError e) aSource

Try to parse a value from a JSON ByteString, and if not, try to parse a useful error from the JSON. If we can't do that, complain about a ParseError.