JSONObject Library
This package provides a robust abstraction for handling JSON objects in PHP. It includes functionalities for loading, saving, and manipulating JSON data with a fluent API.
Features
- Load and save JSON data.
- Access and modify JSON data using array syntax.
- Push, prepend, and merge data into JSON objects.
- Filter, map, reduce, and sort JSON data.
- Increment and decrement numeric values.
- Convert JSON objects to and from JSON strings.
- Fluent API for chaining method calls.
Installation
You can install the package via composer:
Usage
Basic Usage
JSONString
The JSONString
class handles JSON data stored as a string. It also extends the JSONObject
abstract class and provides methods to work with JSON data in string format.
Usage
Exception Handling
Both classes handle exceptions related to JSON parsing and file operations. They throw appropriate exceptions when errors occur, allowing you to handle them gracefully in your application.
ArrayAccess and Countable
Data Manipulation
Advanced Methods
License
This project is licensed under the MIT License - see the LICENSE file for details.
Documentation
For detailed documentation, please visit JSONObject Documentation.
Contributing
We welcome contributions! Please read our Contributing Guidelines before making any contributions.
Contact
If you have any questions or feedback, feel free to reach out at [email protected].
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.