autodocodec-0.2.2.0: Self-documenting encoder and decoder
Safe HaskellSafe-Inferred
LanguageHaskell2010

Autodocodec.Aeson

Synopsis

Encoding and decoding JSON

encodeJSONViaCodec :: HasCodec a => a -> ByteString Source #

Encode a value as a JSON ByteString via its type's codec.

Instantiating ToJSON

toJSONViaCodec :: HasCodec a => a -> Value Source #

Implement toJSON via a type's codec.

toJSONVia :: ValueCodec a void -> a -> Value Source #

Implement toJSON via a given codec.

toEncodingViaCodec :: HasCodec a => a -> Encoding Source #

Implement toEncoding via a type's codec.

toEncodingVia :: ValueCodec a void -> a -> Encoding Source #

Implement toEncoding via the given codec.

JSON Objects

Instantiating FromJSON

parseJSONViaCodec :: HasCodec a => Value -> Parser a Source #

Implement parseJSON via a type's codec.

parseJSONVia :: ValueCodec void a -> Value -> Parser a Source #

Implement parseJSON via a given codec.

JSON Objects

To makes sure we definitely export everything.