aeson-pretty-0.6.1: JSON pretty-printing library and command-line tool.

Safe HaskellNone

Data.Aeson.Encode.Pretty

Description

Aeson-compatible pretty-printing of JSON Values.

Synopsis

Documentation

encodePretty :: ToJSON a => a -> ByteStringSource

A drop-in replacement for aeson's encode function, producing JSON-ByteStrings for human readers.

Indents by four spaces per nesting-level.

encodePretty' :: ToJSON a => Int -> a -> ByteStringSource

A variant of encodePretty that takes an additional parameter: the number of spaces to indent per nesting-level.