Provides a type alias and functions to handle decoded Json API documents.
NoMeta is a type of meta object from a Json API Document that means
there is no meta to be decoded in this Document.
NoData is a type of resource that means there is no data object or array in
the json api document.
Retrieves the Json API version.
The default version is 1.0
Retrieves the meta object of the Document if it exists or a NoMeta object.
Retrieves the resource or the List of resources in this Document.
The
Documentrepresents the global Json API document. This version of theDocumentis retrieved viaJsonApi.Decode.functions.It allows you to retrieve information about the decoded
Documentand the decodedResource(s)Example of json api document:
With a resource and a meta with the following type aliases:
The decoded
Documentwill have the following typeDocument Meta Postif it contains only one resource, orDocument Meta (List Post)if it contains several resources.