| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.JSONApi.Document
Description
Entry-point module for this package.
Contains representations of the top-level JSON-API document structure.
- data Document a
- data ErrorDocument a = ErrorDocument {
- _error :: Error a
- _errorLinks :: Maybe Links
- _errorMeta :: Maybe Meta
- data ResourceData a
- mkDocument :: ResourcefulEntity a => [a] -> Maybe Links -> Maybe Meta -> [Value] -> Document a
Documentation
The Document type represents the top-level JSON-API requirement.
data attribute - the resulting JSON may be either a singleton resource
or a list of resources. See Resource for the construction.
For more information see: http://jsonapi.org/format/#document-top-level
data ErrorDocument a Source #
The ErrorDocument type represents the alternative form of the top-level
JSON-API requirement.
error attribute - a descriptive object encapsulating application-specific
error detail.
For more information see: http://jsonapi.org/format/#errors
Constructors
| ErrorDocument | |
Fields
| |
Instances
| Eq (ErrorDocument a) Source # | |
| Show (ErrorDocument a) Source # | |
| Generic (ErrorDocument a) Source # | |
| ToJSON a => ToJSON (ErrorDocument a) Source # | |
| FromJSON a => FromJSON (ErrorDocument a) Source # | |
| type Rep (ErrorDocument a) Source # | |
data ResourceData a Source #
The Resource type encapsulates the underlying Resource
Included in the top-level Document, the Resource may be either
a singleton resource or a list.
For more information see: http://jsonapi.org/format/#document-top-level
Instances
| Eq a => Eq (ResourceData a) Source # | |
| Show a => Show (ResourceData a) Source # | |
| Generic (ResourceData a) Source # | |
| ToJSON a => ToJSON (ResourceData a) Source # | |
| FromJSON a => FromJSON (ResourceData a) Source # | |
| type Rep (ResourceData a) Source # | |
mkDocument :: ResourcefulEntity a => [a] -> Maybe Links -> Maybe Meta -> [Value] -> Document a Source #
Constructor function for the Document data type.