{
{%- if errors %}
    "errors": {{ errors|tojson }},
{%- else %}
    "data": {{ items.0.resource|tojson|safe }},
    {%- if included %}
    "included": [{% for item in included %}
        {{ item.resource|tojson|safe }}{% if not loop.last %},{% endif -%}
    {% endfor %}],
    {% endif -%}
{% endif -%}
    "jsonapi": {
        "version": "1.0"
    }
}
