aeson-extra-0.3.1.1: Extra goodies for aeson

Copyright(C) 2015-2016 Oleg Grenrus
LicenseBSD3
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

Data.Aeson.Extra.Foldable

Description

Helps writing recursive algorithms on Value, for example:

stripNulls :: Value -> Value
stripNulls = cata (embed . f)
 where
   f (ObjectF a) = ObjectF $ HM.filter (== Null) a
   f x = x

Synopsis

Documentation

data ValueF a Source

An algebra of Value

Since: aeson-extra-0.3.1.0

type ObjectF a = HashMap Text a Source

A JSON "object" (key/value map).

Since: aeson-extra-0.3.1.0

type ArrayF a = Vector a Source

A JSON "array" (sequence).

Since: aeson-extra-0.3.1.0