Download the PHP package monster-anshu/jsonata-php without Composer
On this page you can find all versions of the php package monster-anshu/jsonata-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download monster-anshu/jsonata-php
More information about monster-anshu/jsonata-php
Files in monster-anshu/jsonata-php
Package jsonata-php
Short Description A PHP port of JSONata - a lightweight query and transformation language for JSON.
License MIT
Informations about the package jsonata-php
JSONata-PHP
A PHP implementation of the JSONata query and transformation language. This library allows you to query, transform, and manipulate JSON data structures in your PHP applications using the powerful and intuitive JSONata syntax.
What is JSONata?
JSONata is a lightweight query and transformation language for JSON data. Inspired by XPath 3.1, it provides a powerful way to extract and reshape data from any JSON document. It's perfect for complex data manipulation, templating, and data mapping tasks.
Features
- Support for basic JSONata queries.
- Map operator for simple transformations.
- Conditional logic.
- Simple, intuitive API.
- No external dependencies.
- Robust error handling.
Installation
You can install the package via Composer:
Usage
Using the library is straightforward. You create an instance of the Jsonata class, provide your JSONata expression, and then evaluate it against your data.
Basic Example
Here's a simple example of how to extract the name of each product from a JSON object.
Expected Output:
Testing
On Progress
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.
- Fork the repository on GitHub.
- Clone your fork locally (
git clone https://github.com/your-username/jsonata-php.git). - Create a new branch (
git checkout -b my-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin my-feature). - Create a new Pull Request.
License
The MIT License (MIT). Please see the License File for more information.