A wrapper for the standard ext-json with sane defaults
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Anton Smirnov 955c908662 Fix gitlab link 1 week ago
docs Doc formatting 1 week ago
src Encoding 1 week ago
tests Encoding 1 week ago
.gitattributes Decoding 1 week ago
.gitignore Initial commit 1 week ago
.travis.yml Travis config 1 week ago
CHANGELOG.md Changelog 1 week ago
LICENSE.md License 1 week ago
README.md Fix gitlab link 1 week ago
composer.json Decoding 1 week ago
phpcs.xml Initial commit 1 week ago

README.md

JSON

Packagist Packagist Travis

A wrapper for the standard ext-json with sane defaults

Decoding wrapper is the main purpose of the library. It’s killer feature is that JSON objects become instances of ArrayObject instead of stdClass. This both keeps array/object types of the original and allows to work with all data as with arrays.

<?php

$obj = \Arokettu\Json\Json::decode('{"abc": 123}');

// we can access any data array-style
unset($obj['abc']);

// object will not turn into array
echo \Arokettu\Json\Json::encode($obj);

Installation

composer require 'arokettu/json'

Documentation

Read full documentation here: https://sandfox.dev/php/json.html

Support

Please file issues on our main repo at GitLab: https://gitlab.com/sandfox/php-json/-/issues

License

The library is available as open source under the terms of the MIT License.