Resource
Base class for all models representing a JSON API resource
-
Represent a unique signature for a resource Can be used as key in dictionnaries
-
Resource’s id
-
Resource’s meta data
-
Resource’s link(s)
-
Override the keys expected in the JSON API resource object’s attributes to match the model’s attributes Format => [resourceObjectAttributeKey: modelKey]
-
Alias of
resourceAttributesKeys
for an instance instead of the class type -
Attributes that won’t be serialized when serializing to a JSON API resource object
-
Alias of
resourceExcludedAttributes
for an instance instead of the class type -
Define the resource type By default it is the class’ name
-
Alias of
resourceType
for an instance instead of the class type -
Constructor
-
Constructor
-
Serialize to a JSON API resource object
-
Serialize to a JSON API resource identifier object
-
Serialize to a JSON API relationship object
-
By default equality is based on the
ResourceObject
representation -