aeson-0.5.0.0: Fast JSON parsing and encoding

Portabilityportable
Stabilityexperimental
MaintainerBryan O'Sullivan <bos@serpentine.com>

Data.Aeson.Encode

Description

Efficiently serialize a JSON value.

Most frequently, you'll probably want to encode straight to UTF-8 (the standard JSON encoding) using encode.

You can convert a Builder (as returned by fromValue) to a string using e.g. toLazyText.

Synopsis

Documentation

fromValue :: Value -> BuilderSource

Encode a JSON value to a Builder. You can convert this to a string using e.g. toLazyText, or encode straight to UTF-8 (the standard JSON encoding) using encode.

encode :: ToJSON a => a -> ByteStringSource

Efficiently serialize a JSON value as a lazy ByteString.