| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | Bryan O'Sullivan <bos@serpentine.com> |
| Safe Haskell | Safe-Infered |
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.
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.