yaml-0.11.11.2: Support for parsing and rendering YAML documents.

Safe Haskell | None
Language | Haskell2010

Data.Yaml.Pretty

Description

Prettier YAML encoding.

Since: 0.8.13

Synopsis

- encodePretty :: ToJSON a => Config -> a -> ByteString
- data Config
- getConfCompare :: Config -> Text -> Text -> Ordering
- setConfCompare :: (Text -> Text -> Ordering) -> Config -> Config
- getConfDropNull :: Config -> Bool
- setConfDropNull :: Bool -> Config -> Config
- defConfig :: Config
- pretty :: Config -> Value -> YamlBuilder

# Documentation

encodePretty :: ToJSON a => Config -> a -> ByteString #

Configurable `encode`.

Since: 0.8.13

data Config #

Since: 0.8.13

getConfCompare :: Config -> Text -> Text -> Ordering #

Since: 0.8.13

setConfCompare :: (Text -> Text -> Ordering) -> Config -> Config #

Sets ordering for object keys

Since: 0.8.13

getConfDropNull :: Config -> Bool #

Since: 0.8.24

setConfDropNull :: Bool -> Config -> Config #

Drop entries with `Null` value from objects, if set to `True`

Since: 0.8.24

defConfig :: Config #

The default configuration: do not sort objects or drop keys

Since: 0.8.13

pretty :: Config -> Value -> YamlBuilder #