{"id":13752879,"url":"https://github.com/nilportugues/php-json-api","last_synced_at":"2025-04-07T17:11:02.870Z","repository":{"id":34595970,"uuid":"38543572","full_name":"nilportugues/php-json-api","owner":"nilportugues","description":"JSON API transformer outputting valid (PSR-7) API Responses.","archived":false,"fork":false,"pushed_at":"2018-10-19T10:39:10.000Z","size":639,"stargazers_count":69,"open_issues_count":12,"forks_count":35,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T15:18:42.119Z","etag":null,"topics":["api","json","json-api","marshaller","microservice","microservices","php","php7","serialization","serializer","transformer"],"latest_commit_sha":null,"homepage":"http://nilportugues.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nilportugues.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-04T18:26:15.000Z","updated_at":"2025-02-16T04:28:47.000Z","dependencies_parsed_at":"2022-08-28T11:11:37.155Z","dependency_job_id":null,"html_url":"https://github.com/nilportugues/php-json-api","commit_stats":null,"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-json-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-json-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-json-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nilportugues%2Fphp-json-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nilportugues","download_url":"https://codeload.github.com/nilportugues/php-json-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","json","json-api","marshaller","microservice","microservices","php","php7","serialization","serializer","transformer"],"created_at":"2024-08-03T09:01:12.073Z","updated_at":"2025-04-07T17:11:02.827Z","avatar_url":"https://github.com/nilportugues.png","language":"PHP","readme":" JSON API Transformer \u0026 Server Helpers\n=========================================\n\n[![Build Status](https://travis-ci.org/nilportugues/php-json-api.svg)](https://travis-ci.org/nilportugues/php-json-api)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/nilportugues/json-api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/nilportugues/json-api/?branch=master) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/e39e4c0e-a402-495b-a763-6e0482e2083d/mini.png)](https://insight.sensiolabs.com/projects/e39e4c0e-a402-495b-a763-6e0482e2083d) [![Latest Stable Version](https://poser.pugx.org/nilportugues/json-api/v/stable)](https://packagist.org/packages/nilportugues/json-api) [![Total Downloads](https://poser.pugx.org/nilportugues/json-api/downloads)](https://packagist.org/packages/nilportugues/json-api) [![License](https://poser.pugx.org/nilportugues/json-api/license)](https://packagist.org/packages/nilportugues/json-api) \n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://paypal.me/nilportugues)\n\n - [Installation](#installation)\n - [Transfomer Classes](#transfomer-classes)\n - [Server Classes](#server-classes)\n    - [JSON API Request object](#json-api-request-object)\n    - [Request Object](#request-object)\n    - [JSON API Response objects](#json-api-response-objects)\n    - [Action Objects](#action-objects)\n    \n\n# Installation\n\nUse [Composer](https://getcomposer.org) to install the package:\n\n```json\n$ composer require nilportugues/json-api\n```\n\n\n# Transfomer Classes\n\nGiven a PHP Object, and a series of mappings, the **JSON API Transformer** will represent the given data following the `http://jsonapi.org` specification.\n\nFor instance, given the following piece of code, defining a Blog Post and some comments:\n\n```php\n$post = new Post(\n  new PostId(9),\n  'Hello World',\n  'Your first post',\n  new User(\n      new UserId(1),\n      'Post Author'\n  ),\n  [\n      new Comment(\n          new CommentId(1000),\n          'Have no fear, sers, your king is safe.',\n          new User(new UserId(2), 'Barristan Selmy'),\n          [\n              'created_at' =\u003e (new DateTime('2015/07/18 12:13:00'))-\u003eformat('c'),\n              'accepted_at' =\u003e (new DateTime('2015/07/19 00:00:00'))-\u003eformat('c'),\n          ]\n      ),\n  ]\n);\n```\n\nAnd a Mapping series of classes implementing `JsonApiMapping` interface.\n\n```php\n\u003c?php\nnamespace AcmeProject\\Infrastructure\\Api\\Mappings;\n\nuse NilPortugues\\Api\\Mappings\\JsonApiMapping;\n\nclass PostMapping  implements JsonApiMapping\n{\n    /**\n     * {@inhertidoc}\n     */\n    public function getClass() \n    {\n        return \\Post::class;\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAlias()\n    {\n        return 'Message';\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAliasedProperties() {\n        return [\n            'author' =\u003e 'author',\n            'title' =\u003e 'headline',\n            'content' =\u003e 'body',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getHideProperties(){\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getIdProperties() {\n        return [ \n            'postId',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getUrls()\n    {\n        return [\n            'self' =\u003e 'http://example.com/posts/{postId}',\n            'comments' =\u003e 'http://example.com/posts/{postId}/comments'\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getRelationships()\n    {\n        return [\n            'author' =\u003e [ //this key must match with the property or alias of the same name in Post class.\n                'related' =\u003e 'http://example.com/posts/{postId}/author',\n                'self' =\u003e 'http://example.com/posts/{postId}/relationships/author',\n            ]\n        ];\n    }\n    \n    /**\n     * {@inheritdoc}\n     */\n    public function getRequiredProperties()\n    {\n        return ['author', 'title', 'body'];\n    }\n}\n```\n\n```php\n\u003c?php\nnamespace AcmeProject\\Infrastructure\\Api\\Mappings;\n\nuse NilPortugues\\Api\\Mappings\\JsonApiMapping;\n\nclass PostIdMapping implements JsonApiMapping\n{\n    /**\n     * {@inhertidoc}\n     */\n    public function getClass() \n    {\n        return \\PostId::class;\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAlias()\n    {\n        return '';\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAliasedProperties() {\n        return [],    \n    }\n    /**\n     * {@inheritdoc}\n     */    \n    public function getHideProperties(){\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getIdProperties()\n        return [\n            'postId',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getUrls()\n    {\n        return [\n            'self' =\u003e 'http://example.com/posts/{postId}',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getRelationships()\n    {\n        return [\n            'comment' =\u003e [ //this key must match with the property or alias of the same name in PostId class.\n                'self' =\u003e 'http://example.com/posts/{postId}/relationships/comments',\n                ],\n            ],\n        ];\n    }\n    \n    /**\n     * {@inheritdoc}\n     */\n    public function getRequiredProperties()\n    {\n        return [];\n    }\n}\n```\n\n```php\n\u003c?php\nnamespace AcmeProject\\Infrastructure\\Api\\Mappings;\n\nuse NilPortugues\\Api\\Mappings\\JsonApiMapping;\n\nclass UserMapping implements JsonApiMapping\n{\n    /**\n     * {@inhertidoc}\n     */\n    public function getClass() \n    {\n        return \\User::class;\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAlias()\n    {\n        return '';\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAliasedProperties() {\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getHideProperties(){\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getIdProperties()\n        return [\n            'userId',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getUrls()\n    {\n        return [\n            'self' =\u003e 'http://example.com/users/{userId}',\n            'friends' =\u003e 'http://example.com/users/{userId}/friends',\n            'comments' =\u003e 'http://example.com/users/{userId}/comments',\n        ];\n    }    \n   \n    /**\n     * {@inheritdoc}\n     */\n    public function getRequiredProperties()\n    {\n        return [];\n    }    \n}\n```\n\n```php\n\u003c?php\nnamespace AcmeProject\\Infrastructure\\Api\\Mappings;\n\nuse NilPortugues\\Api\\Mappings\\JsonApiMapping;\n\nclass UserIdMapping implements JsonApiMapping\n{\n    /**\n     * {@inhertidoc}\n     */\n    public function getClass() \n    {\n        return \\UserId::class;\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAlias()\n    {\n        return '';\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAliasedProperties() {\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getHideProperties(){\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getIdProperties()\n        return ['userId'];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getUrls()\n    {\n        return [\n            'self' =\u003e 'http://example.com/users/{userId}',\n            'friends' =\u003e 'http://example.com/users/{userId}/friends',\n            'comments' =\u003e 'http://example.com/users/{userId}/comments',\n        ];\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function getRequiredProperties()\n    {\n        return [];\n    }        \n}\n```\n\n\n```php\n\u003c?php\nnamespace AcmeProject\\Infrastructure\\Api\\Mappings;\n\nuse NilPortugues\\Api\\Mappings\\JsonApiMapping;\n\nclass CommentMapping implements JsonApiMapping\n{\n    /**\n     * {@inhertidoc}\n     */\n    public function getClass() \n    {\n        return \\Comment::class;\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAlias()\n    {\n        return '';\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAliasedProperties() {\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getHideProperties(){\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getIdProperties()\n        return [ 'commentId',];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getUrls()\n    {\n        return [\n            'self' =\u003e 'http://example.com/comments/{commentId}',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getRelationships()\n    {\n        return [\n            'post' =\u003e [ //this key must match with the property or alias of the same name in Comment class.\n                'self' =\u003e 'http://example.com/posts/{postId}/relationships/comments',\n            ]\n        ];\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function getRequiredProperties()\n    {\n        return [];\n    }        \n}\n```\n\n```php\n\u003c?php\nnamespace AcmeProject\\Infrastructure\\Api\\Mappings;\n\nuse NilPortugues\\Api\\Mappings\\JsonApiMapping;\n\nclass CommentId implements JsonApiMapping\n{\n    /**\n     * {@inhertidoc}\n     */\n    public function getClass() \n    {\n        return \\CommentId::class;\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAlias()\n    {\n        return '';\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getAliasedProperties() {\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getHideProperties(){\n        return [];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getIdProperties() {\n        return [ 'commentId', ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getUrls()\n    {\n        return [\n            'self' =\u003e 'http://example.com/comments/{commentId}',\n        ];\n    }\n    /**\n     * {@inheritdoc}\n     */\n    public function getRelationships()\n    {\n        return [\n            'post' =\u003e [ //this key must match with the property or alias of the same name in CommentId class.\n                'self' =\u003e 'http://example.com/posts/{postId}/relationships/comments',\n            ]\n        ];\n    }\n\n    /**\n     * {@inheritdoc}\n     */\n    public function getRequiredProperties()\n    {\n        return [];\n    }        \n}\n```\n\n\nCalling the transformer will output a **valid JSON API response** using the correct formatting:\n\n```php\n\u003c?php\n\nuse NilPortugues\\Api\\JsonApi\\JsonApiSerializer;\nuse NilPortugues\\Api\\JsonApi\\JsonApiTransformer;\nuse NilPortugues\\Api\\JsonApi\\Http\\Message\\Response;\nuse NilPortugues\\Api\\Mapping\\Mapper;\n\n$mappings = [\n    \\AcmeProject\\Infrastructure\\Api\\Mappings\\PostMapping::class,\n    \\AcmeProject\\Infrastructure\\Api\\Mappings\\PostIdMapping::class,\n    \\AcmeProject\\Infrastructure\\Api\\Mappings\\UserMapping::class,\n    \\AcmeProject\\Infrastructure\\Api\\Mappings\\UserIdMapping::class,\n    \\AcmeProject\\Infrastructure\\Api\\Mappings\\CommentMapping::class,\n    \\AcmeProject\\Infrastructure\\Api\\Mappings\\CommentId::class,\n];\n\n$mapper = new Mapper($mappings);\n\n$transformer = new JsonApiTransformer($mapper);\n$serializer = new JsonApiSerializer($transformer);\n\necho $serializer-\u003eserialize($post);\n```\n\n**Output (formatted):**\n\n```json\n{\n    \"data\": {\n        \"type\": \"message\",\n        \"id\": \"9\",\n        \"attributes\": {\n            \"headline\": \"Hello World\",\n            \"body\": \"Your first post\"\n        },\n        \"links\": {\n            \"self\": {\n                \"href\": \"http://example.com/posts/9\"\n            },\n            \"comments\": {\n                \"href\": \"http://example.com/posts/9/comments\"\n            }\n        },\n        \"relationships\": {\n            \"author\": {\n                \"links\": {\n                    \"self\": {\n                        \"href\": \"http://example.com/posts/9/relationships/author\"\n                    },\n                    \"related\": {\n                        \"href\": \"http://example.com/posts/9/author\"\n                    }\n                },\n                \"data\": {\n                    \"type\": \"user\",\n                    \"id\": \"1\"\n                }\n            }\n        }\n    },\n    \"included\": [\n        {\n            \"type\": \"user\",\n            \"id\": \"1\",\n            \"attributes\": {\n                \"name\": \"Post Author\"\n            },\n            \"links\": {\n                \"self\": {\n                    \"href\": \"http://example.com/users/1\"\n                },\n                \"friends\": {\n                    \"href\": \"http://example.com/users/1/friends\"\n                },\n                \"comments\": {\n                    \"href\": \"http://example.com/users/1/comments\"\n                }\n            }\n        },\n        {\n            \"type\": \"user\",\n            \"id\": \"2\",\n            \"attributes\": {\n                \"name\": \"Barristan Selmy\"\n            },\n            \"links\": {\n                \"self\": {\n                    \"href\": \"http://example.com/users/2\"\n                },\n                \"friends\": {\n                    \"href\": \"http://example.com/users/2/friends\"\n                },\n                \"comments\": {\n                    \"href\": \"http://example.com/users/2/comments\"\n                }\n            }\n        },\n        {\n            \"type\": \"comment\",\n            \"id\": \"1000\",\n            \"attributes\": {\n                \"dates\": {\n                    \"created_at\": \"2015-08-13T21:11:07+02:00\",\n                    \"accepted_at\": \"2015-08-13T21:46:07+02:00\"\n                },\n                \"comment\": \"Have no fear, sers, your king is safe.\"\n            },\n            \"relationships\": {\n                \"user\": {\n                    \"data\": {\n                        \"type\": \"user\",\n                        \"id\": \"2\"\n                    }\n                }\n            },\n            \"links\": {\n                \"self\": {\n                    \"href\": \"http://example.com/comments/1000\"\n                }\n            }\n        }\n    ],\n    \"jsonapi\": {\n        \"version\": \"1.0\"\n    }\n}\n```\n\n---\n\n# Server Classes\n\n## JSON API Request object\n\nJSON API comes with its Request class, framework agnostic, implementing the PSR-7 Request Interface.\n\nUsing this request object will provide you access to all the interactions expected in a JSON API:\n\n#### Defined Query Parameters:\n\n- **\u0026fields[resource]=field1,field2** will only show the specified fields for a given resource.\n- **\u0026include=resource** show the relationship for a given resource.\n- **\u0026include=resource.resource2** show the relationship field for those depending on resource2.\n- **\u0026sort=field1,-field2** sort by field2 as DESC and field1 as ASC.\n- **\u0026sort=-field1,field2** sort by field1 as DESC and field2 as ASC.\n- **\u0026page[number]** will return the current page elements in a *page-based* pagination strategy.\n- **\u0026page[size]** will return the total amout of elements in a *page-based* pagination strategy.\n- **\u0026page[limit]** will return the limit in a *offset-based* pagination strategy.\n- **\u0026page[offset]** will return the offset value in a *offset-based* pagination strategy.\n- **\u0026page[cursor]** will return the cursor value  in a *cursor-based* pagination strategy.\n- **\u0026filter** will return data passed in the filter param.\n\n## Request Object\n\nGiven the query parameters listed above, Request implements helper methods that parse and return data already prepared.\n\n```php\nnamespace \\NilPortugues\\Api\\JsonApi\\Http\\Request;\n\nclass Request\n{\n  public function __construct(ServerRequestInterface $request = null) { ... }\n  public function getIncludedRelationships() { ... }\n  public function getSort() { ... }\n  public function getPage() { ... }\n  public function getFilters() { ... }\n  public function getFields() { ... }\n}\n```\n\n## JSON API Response objects\n\nBecause the JSON API specification lists a set of behaviours, specific Response objects are provided for successful and error cases.\n\n**Success**\n\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\Response`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceUpdated`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceAccepted`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceCreated`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceDeleted`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceProcessing`\n\n**Error**\n\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\BadRequest`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceConflicted`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\ResourceNotFound`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\TooManyRequests`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\UnprocessableEntity`\n- `NilPortugues\\Api\\JsonApi\\Http\\Response\\UnsupportedAction`\n\n**Forbidden Access**\n\nIt is also possible to fire a `Forbidden` response by throwing the following Exception in your code:\n\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\Exceptions\\ForbiddenException`\n\nAccess control logic is not provided.\n\n\n## Action Objects\n\nHaving Request and Response objects and Transformers, it just makes sense to have a set of classes that tie them all together into something more powerful: **Actions**.\n\nProvided actions are: \n\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\CreateResource`\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\DeleteResource`\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\GetResource`\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\ListResource`\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\PatchResource`\n- `NilPortugues\\Api\\JsonApi\\Server\\Actions\\PutResource`\n\nAll actions share a `get` method to run the Resource. \n\nThese `get` methods will expect in all cases one or more `callables`. This has been done to avoid coupling with any library or interface and being able to extend it.\n\n---\n\n## Quality\n\nTo run the PHPUnit tests at the command line, go to the tests directory and issue phpunit.\n\nThis library attempts to comply with [PSR-1](http://www.php-fig.org/psr/psr-1/), [PSR-2](http://www.php-fig.org/psr/psr-2/), [PSR-4](http://www.php-fig.org/psr/psr-4/) and [PSR-7](http://www.php-fig.org/psr/psr-7/).\n\nIf you notice compliance oversights, please send a patch via [Pull Request](https://github.com/nilportugues/jsonapi-transformer/pulls).\n\n\n\n## Contribute\n\nContributions to the package are always welcome!\n\n* Report any bugs or issues you find on the [issue tracker](https://github.com/nilportugues/jsonapi-transformer/issues/new).\n* You can grab the source code at the package's [Git repository](https://github.com/nilportugues/jsonapi-transformer).\n\n\n\n## Support\n\nGet in touch with me using one of the following means:\n\n - Emailing me at \u003ccontact@nilportugues.com\u003e\n - Opening an [Issue](https://github.com/nilportugues/jsonapi-transformer/issues/new)\n - Using Gitter: [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/nilportugues/jsonapi-transformer?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\n\n\n## Authors\n\n* [Nil Portugués Calderó](http://nilportugues.com)\n* [The Community Contributors](https://github.com/nilportugues/jsonapi-transformer/graphs/contributors)\n\n\n## License\nThe code base is licensed under the [MIT license](LICENSE).\n","funding_links":["https://paypal.me/nilportugues"],"categories":["transformer"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilportugues%2Fphp-json-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnilportugues%2Fphp-json-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnilportugues%2Fphp-json-api/lists"}