PHPackages                             vgirol/jsonapi-structure - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. vgirol/jsonapi-structure

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

vgirol/jsonapi-structure
========================

Tools to check content of a JSON:API request

v1.3.2(5y ago)05474MITPHPPHP ^7.3|^8.0

Since Jan 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/VGirol/JsonApi-Structure)[ Packagist](https://packagist.org/packages/vgirol/jsonapi-structure)[ Docs](https://github.com/VGirol/JsonApi-Structure)[ RSS](/packages/vgirol-jsonapi-structure/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (7)Dependencies (4)Versions (10)Used By (4)

JsonApi-Structure
=================

[](#jsonapi-structure)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ee10f1b0df9a24699aaf27fb20a4c3edeab5b8f340a73292ad7768243c01b9c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f564769726f6c2f4a736f6e4170692d5374727563747572652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/VGirol/JsonApi-Structure)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/a0b9c134891ea7f178d6fa1f39830b665ab98627cefd6219931c43a137d4aba8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f564769726f6c2f4a736f6e4170692d5374727563747572652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/VGirol/JsonApi-Structure)[![Coverage Status](https://camo.githubusercontent.com/12a3dbf5591999d1614ce2abda964b84e95fd0f86c01dd6c43bd2deedfdede74/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f564769726f6c2f4a736f6e4170692d5374727563747572652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/VGirol/JsonApi-Structure/code-structure)[![Quality Score](https://camo.githubusercontent.com/89b9799d39df46b02e20bb96dd633ab484846e906f03de3d8a6de8b9e7627599/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f564769726f6c2f4a736f6e4170692d5374727563747572652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/VGirol/JsonApi-Structure)[![Infection MSI](https://camo.githubusercontent.com/550ac25ef8511854f021ba46d873561b3a1014eefba687b401656bc756c337d0/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d253246564769726f6c2532464a736f6e4170692d5374727563747572652532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/VGirol/JsonApi-Structure/master)[![Total Downloads](https://camo.githubusercontent.com/6ec1dfc7049e7ee1f2ea71aadb76162fd3084b45acbab4c7d649e6af95766243/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f564769726f6c2f4a736f6e4170692d5374727563747572652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/VGirol/JsonApi-Structure)

This package provides a set of tools to check content of a request using the [JSON:API specification](https://jsonapi.org/).

Technologies
------------

[](#technologies)

- PHP 7.3+

Installation
------------

[](#installation)

To install through composer, simply put the following in your `composer.json` file:

```
{
    "require-dev": {
        "vgirol/jsonapi-structure": "dev-master"
    }
}
```

And then run `composer install` from the terminal.

### Quick Installation

[](#quick-installation)

Above installation can also be simplified by using the following command:

```
$ composer require vgirol/jsonapi-structure
```

Usage
-----

[](#usage)

```
use VGirol\JsonApiStructure\ValidateService;

$json = [
    'data' => [
        'type' => 'resource',
        'id' => '5'
    ],
    'jsonapi' => [
        'version' => '1.0',
        'meta' => [
            'key' => 'value'
        ]
    ]
];

$service = new ValidateService('POST');
$service->validateStructure($json);
```

Documentation
-------------

[](#documentation)

The API documentation is available in XHTML format at the url .

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Vincent Girol](https://github.com/VGirol)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~54 days

Recently: every ~89 days

Total

9

Last Release

1869d ago

Major Versions

v1.2.1 → v2.x-dev2020-04-25

PHP version history (4 changes)v1.0.0PHP ^7.2

v1.1.1PHP ^7.2|^7.3

v1.3.0PHP ^7.3

v1.3.2PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c5077b4f7fc77f8df031535dc5c832fa9ce6b6d2c90132e3093ea6648bfcde46?d=identicon)[VGirol](/maintainers/VGirol)

---

Top Contributors

[![VGirol](https://avatars.githubusercontent.com/u/18059718?v=4)](https://github.com/VGirol "VGirol (57 commits)")

---

Tags

vgirolJsonApi-Structure

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vgirol-jsonapi-structure/health.svg)

```
[![Health](https://phpackages.com/badges/vgirol-jsonapi-structure/health.svg)](https://phpackages.com/packages/vgirol-jsonapi-structure)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
