Document
Represent a JSON API document
-
-
-
-
Represent the forms that the document primary data can take Resource and Resource Identifier are quite the same and can been see as inheritance, so we handle only the most flexible case
See more -
Primary data
-
Errors
-
Non-standard meta-information
-
Describe the server’s implementation
-
Links related to the primary data
-
Resource object that are related to the primary data and/or each other
-
Constructor
Throws
DocumentError.emptyDocument
: If neither data or errors or meta are setDocumentError.includedWithoutData
: If included is set without dataDocumentError.dataAndError
: If data and errors are setDocumentError.missingKey
: Iftype
attribute is missing in resource(s)DocumentError.emptyRelationshipObject
: If neither links or data or meta are set in resource(s) relationship(s)DocumentError.missingKey
: Ifid
and/ortype
attribute are missing in resource(s) relationship(s) indentifier(s)
-
Constructor
Throws
DocumentError.emptyDocument
: If neither data or errors or meta are setDocumentError.includedWithoutData
: If included is set without dataDocumentError.dataAndError
: If data and errors are set
-
Serialize to JSON format
-
Provide additional information about problems encountered while performing an operation
See more -
Describe the server’s implementation
See more -
Represent links
See more -
Identifies a relationship
See more -
Identifies an individual resource
See more -
Represent a resource
See more