jsonyx / jsonyx
(C)oncept-Labs Extended JSON Pluggable parser
1.0.1.6
2025-03-13 23:35 UTC
Requires
- php: >=8.2
- dotaccess/dotarray: ^1.0
- pluggarray/pluggarray: ^1.0
Suggests
- concept-labs/singularity: PSR Container. Powerfull aAnd Flexable Dependency Injection pack
- pluggarray/pluggarray: Pluggable array walker
README
jsonyx is a powerful JSON manipulation library for PHP. It provides an easy-to-use API for parsing, generating, and transforming JSON data. It also supports plugins from the pluggarray/pluggarray package, offering an easy static API in the Facade/Jsonyx class.
Features
- Simple and intuitive API
- High performance
- Support for complex JSON structures
- Flexible and extensible
- Plugin support via
pluggarray/pluggarray
Installation
You can install jsonyx via Composer:
composer require jsonyx/jsonyx
Usage
Here is a basic example of how to use jsonyx:
use Jsonyx\Facade\Jsonyx; $json = ' { "@import": "common/constants.json", "@const": { "FOO": "foo", "BAR": "bar" }, "foo-refs": { "reference-node": { ... } }, "user": { "name": "${user.name}", "age": 30, "foo": "@const(FOO) and @const(BAR)", "baz": "env value: @env(BAZ)", "ref": "@reference(foo-refs.reference-node), "address": "@include(user/${user.id}/address.json)" } } '; $userData = [ 'id' => 1, 'name': 'John Doe' ]; $jsonyx = \Jsonyx\Facade\Jsonyx::Jsonyx($userData); // or new Jsonyx($userData) $jsonyx->withPlugin( function() )
Contributing
We welcome contributions! Please read our contributing guidelines for more details.
License
This project is licensed under the MIT License. See the LICENSE file for more information.