Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module representing a JSON-API resource object.
Specification: http://jsonapi.org/format/#document-resource-objects
Synopsis
- class HasIdentifier a where
- identifier :: a -> Identifier
- data Identifier = Identifier {}
- datatype :: Lens' Identifier Text
- ident :: Lens' Identifier Text
- metadata :: Lens' Identifier (Maybe Meta)
Documentation
class HasIdentifier a where Source #
Typeclass indicating how to access an Identifier
for
a given datatype
identifier :: a -> Identifier Source #
Instances
HasIdentifier (Resource a) Source # | |
Defined in Network.JSONApi.Resource identifier :: Resource a -> Identifier Source # |
data Identifier Source #
Identifiers are used to encapsulate the minimum amount of information to uniquely identify a resource.
This object will be found at multiple levels of the JSON-API structure
Specification: http://jsonapi.org/format/#document-resource-identifier-objects
Instances
Eq Identifier Source # | |
Defined in Network.JSONApi.Identifier (==) :: Identifier -> Identifier -> Bool # (/=) :: Identifier -> Identifier -> Bool # | |
Show Identifier Source # | |
Defined in Network.JSONApi.Identifier showsPrec :: Int -> Identifier -> ShowS # show :: Identifier -> String # showList :: [Identifier] -> ShowS # | |
ToJSON Identifier Source # | |
Defined in Network.JSONApi.Identifier toJSON :: Identifier -> Value # toEncoding :: Identifier -> Encoding # toJSONList :: [Identifier] -> Value # toEncodingList :: [Identifier] -> Encoding # | |
FromJSON Identifier Source # | |
Defined in Network.JSONApi.Identifier parseJSON :: Value -> Parser Identifier # parseJSONList :: Value -> Parser [Identifier] # |