| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.JSONApi.Identifier
Description
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
Methods
identifier :: a -> Identifier Source #
Instances
| HasIdentifier (Resource a) Source # | |
Defined in Network.JSONApi.Resource Methods 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 | |
| Show Identifier Source # | |
Defined in Network.JSONApi.Identifier Methods showsPrec :: Int -> Identifier -> ShowS # show :: Identifier -> String # showList :: [Identifier] -> ShowS # | |
| ToJSON Identifier Source # | |
Defined in Network.JSONApi.Identifier Methods toJSON :: Identifier -> Value # toEncoding :: Identifier -> Encoding # toJSONList :: [Identifier] -> Value # toEncodingList :: [Identifier] -> Encoding # | |
| FromJSON Identifier Source # | |
Defined in Network.JSONApi.Identifier | |