PHP code example of vgirol / jsonapi-structure
1. Go to this page and download the library: Download vgirol/jsonapi-structure library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vgirol / jsonapi-structure example snippets
php
use VGirol\JsonApiStructure\ValidateService;
$json = [
'data' => [
'type' => 'resource',
'id' => '5'
],
'jsonapi' => [
'version' => '1.0',
'meta' => [
'key' => 'value'
]
]
];
$service = new ValidateService('POST');
$service->validateStructure($json);