File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ ## Description
2+
3+ Extension for [ neomerx/json-api] ( https://github.com/neomerx/json-api ) that adds HTML Request Body content validation.
4+
5+ ## Why?
6+
7+ PHP provides ` json_decode ` to decode a provided JSON string. However, the JSON API spec describes how the request
8+ JSON should be * semantically* correct. E.g. when a client is providing a resource object for a create request, the
9+ ` attributes ` member must be an object.
10+
11+ This package provides framework agnostic validation of the received request body content - so that it can be handled
12+ knowing that not only has ` json_decode ` successfully run, but that the structure of the decoded JSON is as expected.
13+ Provided decoders also returns decoded content as ` StandardObject ` instances, an object that provides a number of
14+ helper methods for handling the decoded content e.g. within a controller.
15+
16+ ## Status
17+
18+ This repository is under active development and is currently in a pre-release state.
19+
20+ ## License
21+
22+ Apache License (Version 2.0). Please see [ License File] ( LICENSE ) for more information.
You can’t perform that action at this time.
0 commit comments