1{-# LANGUAGE NoImplicitPrelude #-}
3-- Module: Data.Aeson.Types
4-- Copyright: (c) 2011-2016 Bryan O'Sullivan
5-- (c) 2011 MailRank, Inc.
7-- Maintainer: Bryan O'Sullivan <bos@serpentine.com>
8-- Stability: experimental
9-- Portability: portable
11-- Types for working with JSON data.
13module Data.Aeson.Types
26 -- * Convenience types and functions
45 , ToJSONKeyFunction(..)
47 , contramapToJSONKeyFunction
49 , FromJSONKeyFunction(..)
51 , coerceFromJSONKeyFunction
52 , mapFromJSONKeyFunction
54 -- ** Liftings to unary and binary type constructors
66 -- ** Generic JSON classes
77 , genericLiftToEncoding
79 , genericLiftParseJSON
81 -- * Inspecting @'Value's@
100 , explicitParseFieldMaybe
101 , explicitParseFieldMaybe'
107 -- * Generic and TH encoding configuration
113 , constructorTagModifier
114 , allNullaryToStringTag
118 , tagSingleConstructors
120 -- ** Options utilities
125 , defaultTaggedObject
130import Data.Aeson.Encoding (Encoding, unsafeToEncoding, fromEncoding, Series, pairs)
131import Data.Aeson.Types.Class
132import Data.Aeson.Types.Internal
133import Data.Foldable (toList)
135-- | Encode a 'Foldable' as a JSON array.
136foldable :: (Foldable t, ToJSON a) => t a -> Encoding
137foldable = toEncoding . toList
138{-# INLINE foldable #-}
141-- The functions here are in fact record fields of the 'Options' type.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list