ResourceObject
Represent a resource
-
Resource’s id
-
Resource’s type
-
Resource’s data
-
Relationships between the resource and other resources
-
Links related to the resource
-
Non-standard meta-information about the resource that can not be represented as an attribute or relationship
-
Constructor
Throws
DocumentError.missingKey
: Iftype
attribute is missingDocumentError.emptyRelationshipObject
: If neither links or data or meta are set in relationship(s)DocumentError.missingKey
: Ifid
and/ortype
attribute are missing in relationship(s) indentifier(s)
-
Constructor
-
Serialize to JSON format
-
Equality is based on
id
,type
,attributes
andrelationships