aeson-2.2.3.0: Fast JSON parsing and encoding

Safe Haskell | None
Language | Haskell2010

Data.Aeson.KeyMap

Contents

- Map Type
- Query
- Construction
  - Insertion
- Deletion
- Update
- Combine
- Lists
- Maps
- Traversal
  - Map
- Folds
- Conversions
- Filter
- Key Type

Description

An abstract interface for maps from JSON keys to values.

Since: 2.0.0.0

Synopsis

- data KeyMap v
- null :: KeyMap v -> Bool
- lookup :: Key -> KeyMap v -> Maybe v
- (!?) :: KeyMap v -> Key -> Maybe v
- size :: KeyMap v -> Int
- member :: Key -> KeyMap a -> Bool
- empty :: KeyMap v
- singleton :: Key -> v -> KeyMap v
- insert :: Key -> v -> KeyMap v -> KeyMap v
- insertWith :: (a -> a -> a) -> Key -> a -> KeyMap a -> KeyMap a
- delete :: Key -> KeyMap v -> KeyMap v
- alterF :: Functor f => (Maybe v -> f (Maybe v)) -> Key -> KeyMap v -> f (KeyMap v)
- difference :: KeyMap v -> KeyMap v' -> KeyMap v
- union :: KeyMap v -> KeyMap v -> KeyMap v
- unionWith :: (v -> v -> v) -> KeyMap v -> KeyMap v -> KeyMap v
- unionWithKey :: (Key -> v -> v -> v) -> KeyMap v -> KeyMap v -> KeyMap v
- intersection :: KeyMap a -> KeyMap b -> KeyMap a
- intersectionWith :: (a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c
- intersectionWithKey :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c
- alignWith :: (These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c
- alignWithKey :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c
- fromList :: [(Key, v)] -> KeyMap v
- fromListWith :: (v -> v -> v) -> [(Key, v)] -> KeyMap v
- toList :: KeyMap v -> [(Key, v)]
- toAscList :: KeyMap v -> [(Key, v)]
- elems :: KeyMap v -> [v]
- fromHashMap :: HashMap Key v -> KeyMap v
- toHashMap :: KeyMap v -> HashMap Key v
- fromHashMapText :: HashMap Text v -> KeyMap v
- toHashMapText :: KeyMap v -> HashMap Text v
- coercionToHashMap :: Maybe (Coercion (HashMap Key v) (KeyMap v))
- fromMap :: Map Key v -> KeyMap v
- toMap :: KeyMap v -> Map Key v
- fromMapText :: Map Text v -> KeyMap v
- toMapText :: KeyMap v -> Map Text v
- coercionToMap :: Maybe (Coercion (Map Key v) (KeyMap v))
- map :: (a -> b) -> KeyMap a -> KeyMap b
- mapWithKey :: (Key -> a -> b) -> KeyMap a -> KeyMap b
- mapKeyVal :: (Key -> Key) -> (v1 -> v2) -> KeyMap v1 -> KeyMap v2
- traverse :: Applicative f => (v1 -> f v2) -> KeyMap v1 -> f (KeyMap v2)
- traverseWithKey :: Applicative f => (Key -> v1 -> f v2) -> KeyMap v1 -> f (KeyMap v2)
- foldr :: (a -> b -> b) -> b -> KeyMap a -> b
- foldr' :: (a -> b -> b) -> b -> KeyMap a -> b
- foldl :: (b -> a -> b) -> b -> KeyMap a -> b
- foldl' :: (b -> a -> b) -> b -> KeyMap a -> b
- foldMapWithKey :: Monoid m => (Key -> a -> m) -> KeyMap a -> m
- foldrWithKey :: (Key -> v -> a -> a) -> a -> KeyMap v -> a
- keys :: KeyMap v -> [Key]
- filter :: (v -> Bool) -> KeyMap v -> KeyMap v
- filterWithKey :: (Key -> v -> Bool) -> KeyMap v -> KeyMap v
- mapMaybe :: (a -> Maybe b) -> KeyMap a -> KeyMap b
- mapMaybeWithKey :: (Key -> v -> Maybe u) -> KeyMap v -> KeyMap u
- data Key

# Map Type

data KeyMap v #

A map from JSON key type `Key` to `v`.

#### Instances

Instances details

Arbitrary1 KeyMap # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.KeyMap Methods liftArbitrary :: Gen a -> Gen (KeyMap a) # liftShrink :: (a -> [a]) -> KeyMap a -> [KeyMap a] #
FromJSON1 KeyMap # | Since: 2.0.1.0
Instance details Defined in Data.Aeson.Types.FromJSON Methods liftParseJSON :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (KeyMap a) # liftParseJSONList :: Maybe a -> (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [KeyMap a] # liftOmittedField :: Maybe a -> Maybe (KeyMap a) #
ToJSON1 KeyMap # |
Instance details Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> KeyMap a -> Value # liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [KeyMap a] -> Value # liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> KeyMap a -> Encoding # liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [KeyMap a] -> Encoding # liftOmitField :: (a -> Bool) -> KeyMap a -> Bool #
Functor KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods fmap :: (a -> b) -> KeyMap a -> KeyMap b # (<$) :: a -> KeyMap b -> KeyMap a #
Foldable KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods fold :: Monoid m => KeyMap m -> m # foldMap :: Monoid m => (a -> m) -> KeyMap a -> m # foldMap' :: Monoid m => (a -> m) -> KeyMap a -> m # foldr :: (a -> b -> b) -> b -> KeyMap a -> b # foldr' :: (a -> b -> b) -> b -> KeyMap a -> b # foldl :: (b -> a -> b) -> b -> KeyMap a -> b # foldl' :: (b -> a -> b) -> b -> KeyMap a -> b # foldr1 :: (a -> a -> a) -> KeyMap a -> a # foldl1 :: (a -> a -> a) -> KeyMap a -> a # toList :: KeyMap a -> [a] # null :: KeyMap a -> Bool # length :: KeyMap a -> Int # elem :: Eq a => a -> KeyMap a -> Bool # maximum :: Ord a => KeyMap a -> a # minimum :: Ord a => KeyMap a -> a # sum :: Num a => KeyMap a -> a # product :: Num a => KeyMap a -> a #
Traversable KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods traverse :: Applicative f => (a -> f b) -> KeyMap a -> f (KeyMap b) # sequenceA :: Applicative f => KeyMap (f a) -> f (KeyMap a) # mapM :: Monad m => (a -> m b) -> KeyMap a -> m (KeyMap b) # sequence :: Monad m => KeyMap (m a) -> m (KeyMap a) #
Align KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods nil :: KeyMap a #
Semialign KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods align :: KeyMap a -> KeyMap b -> KeyMap (These a b) # alignWith :: (These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #
Zip KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods zip :: KeyMap a -> KeyMap b -> KeyMap (a, b) # zipWith :: (a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #
Filterable KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods mapMaybe :: (a -> Maybe b) -> KeyMap a -> KeyMap b # catMaybes :: KeyMap (Maybe a) -> KeyMap a # filter :: (a -> Bool) -> KeyMap a -> KeyMap a # drain :: KeyMap a -> KeyMap b #
Witherable KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods wither :: Applicative f => (a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) # witherM :: Monad m => (a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) # filterA :: Applicative f => (a -> f Bool) -> KeyMap a -> f (KeyMap a) # witherMap :: Applicative m => (KeyMap b -> r) -> (a -> m (Maybe b)) -> KeyMap a -> m r #
FoldableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods ifoldMap :: Monoid m => (Key -> a -> m) -> KeyMap a -> m # ifoldMap' :: Monoid m => (Key -> a -> m) -> KeyMap a -> m # ifoldr :: (Key -> a -> b -> b) -> b -> KeyMap a -> b # ifoldl :: (Key -> b -> a -> b) -> b -> KeyMap a -> b # ifoldr' :: (Key -> a -> b -> b) -> b -> KeyMap a -> b # ifoldl' :: (Key -> b -> a -> b) -> b -> KeyMap a -> b #
FunctorWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods imap :: (Key -> a -> b) -> KeyMap a -> KeyMap b #
TraversableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods itraverse :: Applicative f => (Key -> a -> f b) -> KeyMap a -> f (KeyMap b) #
SemialignWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods ialignWith :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #
ZipWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods izipWith :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #
FilterableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods imapMaybe :: (Key -> a -> Maybe b) -> KeyMap a -> KeyMap b # ifilter :: (Key -> a -> Bool) -> KeyMap a -> KeyMap a #
WitherableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods iwither :: Applicative f => (Key -> a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) # iwitherM :: Monad m => (Key -> a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) # ifilterA :: Applicative f => (Key -> a -> f Bool) -> KeyMap a -> f (KeyMap a) #
value ~ Value => KeyValue Value (KeyMap value) # | Constructs a singleton `KeyMap`. For calling functions that demand an `Object` for constructing objects. To be used in conjunction with `mconcat`. Prefer to use `object` where possible.
Instance details Defined in Data.Aeson.Types.ToJSON Methods (.=) :: ToJSON v => Key -> v -> KeyMap value # explicitToField :: (v -> Value) -> Key -> v -> KeyMap value #
value ~ Value => KeyValueOmit Value (KeyMap value) # |
Instance details Defined in Data.Aeson.Types.ToJSON Methods (.?=) :: ToJSON v => Key -> v -> KeyMap value # explicitToFieldOmit :: (v -> Bool) -> (v -> Value) -> Key -> v -> KeyMap value #
Lift v => Lift (KeyMap v :: Type) # |
Instance details Defined in Data.Aeson.KeyMap Methods lift :: Quote m => KeyMap v -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => KeyMap v -> Code m (KeyMap v) #
Arbitrary v => Arbitrary (KeyMap v) # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.KeyMap Methods arbitrary :: Gen (KeyMap v) # shrink :: KeyMap v -> [KeyMap v] #
CoArbitrary v => CoArbitrary (KeyMap v) # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.KeyMap Methods coarbitrary :: KeyMap v -> Gen b -> Gen b #
Function v => Function (KeyMap v) # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.KeyMap Methods function :: (KeyMap v -> b) -> KeyMap v :-> b #
FromJSON v => FromJSON (KeyMap v) # | Since: 2.0.1.0
Instance details Defined in Data.Aeson.Types.FromJSON Methods parseJSON :: Value -> Parser (KeyMap v) # parseJSONList :: Value -> Parser [KeyMap v] # omittedField :: Maybe (KeyMap v) #
ToJSON v => ToJSON (KeyMap v) # |
Instance details Defined in Data.Aeson.Types.ToJSON Methods toJSON :: KeyMap v -> Value # toEncoding :: KeyMap v -> Encoding # toJSONList :: [KeyMap v] -> Value # toEncodingList :: [KeyMap v] -> Encoding # omitField :: KeyMap v -> Bool #
NFData v => NFData (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods rnf :: KeyMap v -> () #
Monoid (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods mempty :: KeyMap v # mappend :: KeyMap v -> KeyMap v -> KeyMap v # mconcat :: [KeyMap v] -> KeyMap v #
Semigroup (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods (<>) :: KeyMap v -> KeyMap v -> KeyMap v # sconcat :: NonEmpty (KeyMap v) -> KeyMap v # stimes :: Integral b => b -> KeyMap v -> KeyMap v #
Data v => Data (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KeyMap v -> c (KeyMap v) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (KeyMap v) # toConstr :: KeyMap v -> Constr # dataTypeOf :: KeyMap v -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (KeyMap v)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (KeyMap v)) # gmapT :: (forall b. Data b => b -> b) -> KeyMap v -> KeyMap v # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KeyMap v -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KeyMap v -> r # gmapQ :: (forall d. Data d => d -> u) -> KeyMap v -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> KeyMap v -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KeyMap v -> m (KeyMap v) #
IsList (KeyMap v) # | Since: 2.0.2.0
Instance details Defined in Data.Aeson.KeyMap Associated Types
type Item (KeyMap v) |
Instance details Defined in Data.Aeson.KeyMap type Item (KeyMap v) = (Key, v)
Methods fromList :: [Item (KeyMap v)] -> KeyMap v # fromListN :: Int -> [Item (KeyMap v)] -> KeyMap v # toList :: KeyMap v -> [Item (KeyMap v)] #
Read v => Read (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods readsPrec :: Int -> ReadS (KeyMap v) # readList :: ReadS [KeyMap v] # readPrec :: ReadPrec (KeyMap v) # readListPrec :: ReadPrec [KeyMap v] #
Show v => Show (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods showsPrec :: Int -> KeyMap v -> ShowS # show :: KeyMap v -> String # showList :: [KeyMap v] -> ShowS #
Eq v => Eq (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods (==) :: KeyMap v -> KeyMap v -> Bool # (/=) :: KeyMap v -> KeyMap v -> Bool #
Ord v => Ord (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods compare :: KeyMap v -> KeyMap v -> Ordering # (<) :: KeyMap v -> KeyMap v -> Bool # (<=) :: KeyMap v -> KeyMap v -> Bool # (>) :: KeyMap v -> KeyMap v -> Bool # (>=) :: KeyMap v -> KeyMap v -> Bool # max :: KeyMap v -> KeyMap v -> KeyMap v # min :: KeyMap v -> KeyMap v -> KeyMap v #
Hashable v => Hashable (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap Methods hashWithSalt :: Int -> KeyMap v -> Int # hash :: KeyMap v -> Int #
type Item (KeyMap v) # |
Instance details Defined in Data.Aeson.KeyMap type Item (KeyMap v) = (Key, v)

# Query

null :: KeyMap v -> Bool #

Is the map empty?

lookup :: Key -> KeyMap v -> Maybe v #

Return the value to which the specified key is mapped, or Nothing if this map contains no mapping for the key.

(!?) :: KeyMap v -> Key -> Maybe v #

Return the value to which the specified key is mapped, or Nothing if this map contains no mapping for the key.

This is a flipped version of `lookup`.

Since: 2.1.1.0

size :: KeyMap v -> Int #

Return the number of key-value mappings in this map.

member :: Key -> KeyMap a -> Bool #

Is the key a member of the map?

# Construction

empty :: KeyMap v #

Construct an empty map.

singleton :: Key -> v -> KeyMap v #

Construct a map with a single element.

## Insertion

insert :: Key -> v -> KeyMap v -> KeyMap v #

Associate the specified value with the specified key in this map. If this map previously contained a mapping for the key, the old value is replaced.

insertWith :: (a -> a -> a) -> Key -> a -> KeyMap a -> KeyMap a #

Insert with a function combining new and old values, taken in that order.

Since: 2.1.1.0

# Deletion

delete :: Key -> KeyMap v -> KeyMap v #

Remove the mapping for the specified key from this map if present.

# Update

alterF :: Functor f => (Maybe v -> f (Maybe v)) -> Key -> KeyMap v -> f (KeyMap v) #

`alterF` can be used to insert, delete, or update a value in a map.

# Combine

difference :: KeyMap v -> KeyMap v' -> KeyMap v #

Difference of two maps. Return elements of the first map not existing in the second.

union :: KeyMap v -> KeyMap v -> KeyMap v #

The (left-biased) union of two maps. It prefers the first map when duplicate keys are encountered, i.e. (`union` == `unionWith` `const`).

unionWith :: (v -> v -> v) -> KeyMap v -> KeyMap v -> KeyMap v #

The union with a combining function.

unionWithKey :: (Key -> v -> v -> v) -> KeyMap v -> KeyMap v -> KeyMap v #

The union with a combining function.

intersection :: KeyMap a -> KeyMap b -> KeyMap a #

The (left-biased) intersection of two maps (based on keys).

intersectionWith :: (a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

The intersection with a combining function.

intersectionWithKey :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

The intersection with a combining function.

alignWith :: (These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

Generalized union with combining function.

alignWithKey :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #

Generalized union with combining function.

# Lists

fromList :: [(Key, v)] -> KeyMap v #

Construct a map with the supplied mappings. If the list contains duplicate mappings, the later mappings take precedence.

    >>> fromList [("a", 'x'), ("a", 'y')]
    fromList [("a",'y')]

fromListWith :: (v -> v -> v) -> [(Key, v)] -> KeyMap v #

Construct a map from a list of elements. Uses the provided function, f, to merge duplicate entries with (f newVal oldVal).

toList :: KeyMap v -> [(Key, v)] #

Return a list of this map's keys and elements.

The order is not stable. Use `toAscList` for stable ordering.

toAscList :: KeyMap v -> [(Key, v)] #

Return a list of this map's elements in ascending order based of the textual key.

elems :: KeyMap v -> [v] #

Return a list of this map' elements.

Since: 2.0.3.0

# Maps

fromHashMap :: HashMap Key v -> KeyMap v #

Convert a `HashMap` to a `KeyMap`.

toHashMap :: KeyMap v -> HashMap Key v #

Convert a `KeyMap` to a `HashMap`.

fromHashMapText :: HashMap Text v -> KeyMap v #

Convert a ``HashMap` `Text``to a `KeyMap`.

toHashMapText :: KeyMap v -> HashMap Text v #

Convert a `KeyMap` to a ``HashMap` `Text``.

coercionToHashMap :: Maybe (Coercion (HashMap Key v) (KeyMap v)) #

fromMap :: Map Key v -> KeyMap v #

Convert a `Map` to a `KeyMap`.

toMap :: KeyMap v -> Map Key v #

Convert a `KeyMap` to a `Map`.

fromMapText :: Map Text v -> KeyMap v #

Convert a ``Map` `Text``to a `KeyMap`.

Since: 2.0.2.0

toMapText :: KeyMap v -> Map Text v #

Convert a `KeyMap` to a ``Map` `Text``.

Since: 2.0.2.0

coercionToMap :: Maybe (Coercion (Map Key v) (KeyMap v)) #

# Traversal

## Map

map :: (a -> b) -> KeyMap a -> KeyMap b #

Map a function over all values in the map.

mapWithKey :: (Key -> a -> b) -> KeyMap a -> KeyMap b #

Map a function over all values in the map.

Since: 2.1.0.0

mapKeyVal :: (Key -> Key) -> (v1 -> v2) -> KeyMap v1 -> KeyMap v2 #

Transform the keys and values of a `KeyMap`.

traverse :: Applicative f => (v1 -> f v2) -> KeyMap v1 -> f (KeyMap v2) #

Perform an Applicative action for each key-value pair in a `KeyMap` and produce a `KeyMap` of all the results.

traverseWithKey :: Applicative f => (Key -> v1 -> f v2) -> KeyMap v1 -> f (KeyMap v2) #

Perform an Applicative action for each key-value pair in a `KeyMap` and produce a `KeyMap` of all the results.

# Folds

foldr :: (a -> b -> b) -> b -> KeyMap a -> b #

foldr' :: (a -> b -> b) -> b -> KeyMap a -> b #

foldl :: (b -> a -> b) -> b -> KeyMap a -> b #

foldl' :: (b -> a -> b) -> b -> KeyMap a -> b #

foldMapWithKey :: Monoid m => (Key -> a -> m) -> KeyMap a -> m #

foldrWithKey :: (Key -> v -> a -> a) -> a -> KeyMap v -> a #

Reduce this map by applying a binary operator to all elements, using the given starting value (typically the right-identity of the operator).

# Conversions

keys :: KeyMap v -> [Key] #

Return a list of this map's keys.

# Filter

filter :: (v -> Bool) -> KeyMap v -> KeyMap v #

Filter all keys/values that satisfy some predicate.

filterWithKey :: (Key -> v -> Bool) -> KeyMap v -> KeyMap v #

Filter all keys/values that satisfy some predicate.

mapMaybe :: (a -> Maybe b) -> KeyMap a -> KeyMap b #

Map values and collect the Just results.

mapMaybeWithKey :: (Key -> v -> Maybe u) -> KeyMap v -> KeyMap u #

Map values and collect the Just results.

# Key Type

data Key #

#### Instances

Instances details

Arbitrary Key # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.Key Methods arbitrary :: Gen Key # shrink :: Key -> [Key] #
CoArbitrary Key # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.Key Methods coarbitrary :: Key -> Gen b -> Gen b #
Function Key # | Since: 2.0.3.0
Instance details Defined in Data.Aeson.Key Methods function :: (Key -> b) -> Key :-> b #
FromJSON Key # |
Instance details Defined in Data.Aeson.Types.FromJSON Methods parseJSON :: Value -> Parser Key # parseJSONList :: Value -> Parser [Key] # omittedField :: Maybe Key #
FromJSONKey Key # |
Instance details Defined in Data.Aeson.Types.FromJSON Methods fromJSONKey :: FromJSONKeyFunction Key # fromJSONKeyList :: FromJSONKeyFunction [Key] #
ToJSON Key # |
Instance details Defined in Data.Aeson.Types.ToJSON Methods toJSON :: Key -> Value # toEncoding :: Key -> Encoding # toJSONList :: [Key] -> Value # toEncodingList :: [Key] -> Encoding # omitField :: Key -> Bool #
ToJSONKey Key # |
Instance details Defined in Data.Aeson.Types.ToJSON Methods toJSONKey :: ToJSONKeyFunction Key # toJSONKeyList :: ToJSONKeyFunction [Key] #
NFData Key # |
Instance details Defined in Data.Aeson.Key Methods rnf :: Key -> () #
Monoid Key # |
Instance details Defined in Data.Aeson.Key Methods mempty :: Key # mappend :: Key -> Key -> Key # mconcat :: [Key] -> Key #
Semigroup Key # |
Instance details Defined in Data.Aeson.Key Methods (<>) :: Key -> Key -> Key # sconcat :: NonEmpty Key -> Key # stimes :: Integral b => b -> Key -> Key #
Data Key # |
Instance details Defined in Data.Aeson.Key Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Key -> c Key # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Key # toConstr :: Key -> Constr # dataTypeOf :: Key -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Key) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Key) # gmapT :: (forall b. Data b => b -> b) -> Key -> Key # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Key -> r # gmapQ :: (forall d. Data d => d -> u) -> Key -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Key -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Key -> m Key # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Key -> m Key #
IsString Key # |
Instance details Defined in Data.Aeson.Key Methods fromString :: String -> Key #
Read Key # |
Instance details Defined in Data.Aeson.Key Methods readsPrec :: Int -> ReadS Key # readList :: ReadS [Key] # readPrec :: ReadPrec Key # readListPrec :: ReadPrec [Key] #
Show Key # |
Instance details Defined in Data.Aeson.Key Methods showsPrec :: Int -> Key -> ShowS # show :: Key -> String # showList :: [Key] -> ShowS #
Eq Key # |
Instance details Defined in Data.Aeson.Key Methods (==) :: Key -> Key -> Bool # (/=) :: Key -> Key -> Bool #
Ord Key # |
Instance details Defined in Data.Aeson.Key Methods compare :: Key -> Key -> Ordering # (<) :: Key -> Key -> Bool # (<=) :: Key -> Key -> Bool # (>) :: Key -> Key -> Bool # (>=) :: Key -> Key -> Bool # max :: Key -> Key -> Key # min :: Key -> Key -> Key #
Hashable Key # |
Instance details Defined in Data.Aeson.Key Methods hashWithSalt :: Int -> Key -> Int # hash :: Key -> Int #
FoldableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods ifoldMap :: Monoid m => (Key -> a -> m) -> KeyMap a -> m # ifoldMap' :: Monoid m => (Key -> a -> m) -> KeyMap a -> m # ifoldr :: (Key -> a -> b -> b) -> b -> KeyMap a -> b # ifoldl :: (Key -> b -> a -> b) -> b -> KeyMap a -> b # ifoldr' :: (Key -> a -> b -> b) -> b -> KeyMap a -> b # ifoldl' :: (Key -> b -> a -> b) -> b -> KeyMap a -> b #
FunctorWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods imap :: (Key -> a -> b) -> KeyMap a -> KeyMap b #
TraversableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods itraverse :: Applicative f => (Key -> a -> f b) -> KeyMap a -> f (KeyMap b) #
SemialignWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods ialignWith :: (Key -> These a b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #
ZipWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods izipWith :: (Key -> a -> b -> c) -> KeyMap a -> KeyMap b -> KeyMap c #
Lift Key # |
Instance details Defined in Data.Aeson.Key Methods lift :: Quote m => Key -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => Key -> Code m Key #
FilterableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods imapMaybe :: (Key -> a -> Maybe b) -> KeyMap a -> KeyMap b # ifilter :: (Key -> a -> Bool) -> KeyMap a -> KeyMap a #
WitherableWithIndex Key KeyMap # |
Instance details Defined in Data.Aeson.KeyMap Methods iwither :: Applicative f => (Key -> a -> f (Maybe b)) -> KeyMap a -> f (KeyMap b) # iwitherM :: Monad m => (Key -> a -> m (Maybe b)) -> KeyMap a -> m (KeyMap b) # ifilterA :: Applicative f => (Key -> a -> f Bool) -> KeyMap a -> f (KeyMap a) #