JSONAPI::Document::Builder::Compound - Compound Resource Document builder
version 2.1
Builds a compound resource document, which is essentially a resource document with all of its relationships and attributes.
ArrayRef of relationships to include. This is populated by the include param of a JSON API request.
include
Primary relationships are those belonging directly to row, while nested relationships is an ArrayRef of HashRefs as follows:
row
[ { primary_related => [qw/primary relationships for primary_related/] }, { ... } ]
Where primary_related is the relationship for row, and its associated ArrayRef contains relationships for it.
Builds a HashRef for the primary resource document.
When relationships is populated, will include a relationships entry in the document, populated with related links and identifiers.
relationships
Builds an ArrayRef containing all given relationships. These relationships are built with their attributes.
Uses build_relationship with the rows related resource as the row argument so the builder can find the relationship.
To install JSONAPI::Document, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSONAPI::Document
CPAN shell
perl -MCPAN -e shell install JSONAPI::Document
For more information on module installation, please visit the detailed CPAN module installation guide.