Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Null
- data field := (value :: k)
- data a ==> b
- data WithDefault (val :: k)
- class KnownJSON (a :: k) where
- class KnownBool (b :: Bool) where
- class KnownJSONList (xs :: [k]) where
- class KnownJSONObject (a :: k) where
- class KnownJSONFunction (a :: Type) where
- functionVal :: Proxy a -> Value -> Value
Documentation
Represents the null JSON Value
.
data field := (value :: k) infix 3 Source #
Phantom data type to make explicit which fields we pass for Aeson options. Polykinded in the second argument so it can take i.e. Booleans or Symbols where needed.
Also used for specifying constant values added to, or required from, an encoding. See Data.Aeson.Deriving.WithConstantFields.
Instances
Represents a function that maps the first value to the second, and otherwise does nothing but return the input.
Instances
All KnownSymbol (a ': (b ': ([] :: [Symbol]))) => StringFunction (a ==> b :: Type) Source # | |
Defined in Data.Aeson.Deriving.Internal.Generic | |
(KnownJSON a, KnownJSON b) => KnownJSONFunction (a ==> b) Source # | |
Defined in Data.Aeson.Deriving.Known |
data WithDefault (val :: k) Source #
Represents the function that turns nulls into the given default value.
Instances
KnownJSON a => KnownJSONFunction (WithDefault a) Source # | |
Defined in Data.Aeson.Deriving.Known functionVal :: Proxy (WithDefault a) -> Value -> Value Source # |
class KnownJSON (a :: k) where Source #
Constant JSON values
class KnownJSONList (xs :: [k]) where Source #
Constant JSON lists
Instances
KnownJSONList ([] :: [k]) Source # | |
(KnownJSON x, KnownJSONList xs) => KnownJSONList (x ': xs :: [k]) Source # | |
class KnownJSONObject (a :: k) where Source #
Constant JSON objects
Instances
KnownJSONObject ([] :: [k]) Source # | |
(KnownJSONObject fields, KnownSymbol key, KnownJSON val) => KnownJSONObject ((key := val) ': fields :: [Type]) Source # | |
class KnownJSONFunction (a :: Type) where Source #
JSON (Value
) functions
Instances
KnownJSON a => KnownJSONFunction (WithDefault a) Source # | |
Defined in Data.Aeson.Deriving.Known functionVal :: Proxy (WithDefault a) -> Value -> Value Source # | |
(KnownJSON a, KnownJSON b) => KnownJSONFunction (a ==> b) Source # | |
Defined in Data.Aeson.Deriving.Known |