aeson-0.7.0.1: Fast JSON parsing and encoding

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

Data.Aeson.Encode

Contents

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 use the conversions to Builders when embedding JSON messages as parts of a protocol.

Synopsis

Documentation

encode :: ToJSON a => a -> ByteStringSource

Encode a JSON Value as a UTF-8 encoded ByteString.

Encoding to Text Builders

encodeToTextBuilder :: Value -> BuilderSource

Encode a JSON Value to a Builder, which can be embedded efficiently in a text-based protocol.

Deprecated

fromValue :: Value -> BuilderSource

Deprecated: Use encodeToTextBuilder instead