Releases: alirezajavadigit/JSONize
JSONize v1.6.6: Enhancements and Bug Fixes
JSONize v1.6.6: Enhancements and Bug Fixes
This release includes important fixes and improvements to enhance the consistency and efficiency of the JSONize library. Here are the key updates:
- Refactor: Improved response structure and status handling in
HasStructure
trait to ensure a more organized response format. - Fix: Corrected status code retrieval in the
getHttpStatus
method within theHasStatus
trait for accurate HTTP status handling. - Fix: Updated default values for
dataKey
andstatus
fields inHasAttribute
trait for better default response structure. - Fix: Changed visibility of the
__wakeup
method to public in theSingleton
trait to prevent errors during object unserialization.
These changes improve the library's robustness and reliability, making it more adaptable for clean, consistent JSON responses across APIs.
JSONize v1.6.5: Enhanced Error Handling and Documentation Updates
[v1.6.5] - 2024-07-13
Added
- Easy error message handling examples in README.
- Support for status messages in the HasAttribute trait.
Changed
- Updated version number in README from v1.5.1 to v1.5.5.
Fixed
- Corrected handling of data and status in the response structure in HasStructure trait.
✅ feat: add status message support
✅ fix: correct data and status handling in response
📝 docs: update README with new error handling examples and version 1.5.5 changes
For more details, visit the JSONize GitHub Repository.
JSONize v1.6.0 - New Features and Enhanced Documentation
JSONize v1.6.0 - New Features and Enhanced Documentation
What's New:
-
Custom Key for Data:
- Added the ability to specify a custom key for data in the JSON response.
- Example:
Response::data(["id" => 1, "name" => "Item"], "item"); /* { "success": true, "message": null, "item": { "id": 1, "name": "Item" }, "status": [ 200, "ok" ] } */
-
Custom Message for Status:
- Added the ability to set a custom message for the HTTP status in the JSON response.
- Example:
Response::data(["id" => 1, "name" => "Item"], "item")->status(142, "example info")->hideMessage(); /* { "success": true, "item": { "id": 1, "name": "Item" }, "status": [ 142, "example info" ] } */
-
Hide Flags for Response Keys:
- Introduced functionality to remove specific keys from the JSON response based on hide flags.
- Example:
$response->data(["id" => 1, "name" => "Item"], "item")->hideStatus()->get(); /* { "success": true, "message": null, "item": { "id": 1, "name": "Item" } } */
-
New Examples Added:
- Added examples for data with a custom key, hiding status, and custom status messages in both Easy and Efficient modes.
- Examples included in the documentation for quick reference.
-
Improved Documentation:
- Updated the
README.md
with new examples for both Easy and Efficient modes, enhancing clarity and usability.
- Updated the
Contributing
Contributions are welcome! Add new HTTP status codes to the System/Traits/HasStatus.php
file. Submit a pull request or open an issue for any problems or suggestions.
License
JSONize is open-source software licensed under the MIT license.
Author
This library is created and maintained by Alireza Javadi. You can reach out to me at e@alirezajawadi.ir.
Upgrade now to streamline your JSON responses!
SONize v1.5.1 - Easy Syntax and Efficient Memory Usage
JSONize v1.5.1 - Easy Syntax and Efficient Memory Usage
Release Date: June 28, 2024
What's New:
-
Easy Syntax for Quick Usage:
- Introduced a new easy-to-use syntax for rapid JSON response generation.
- Example:
use JSONize\App\Easy\Response; Response::message("Deleted Successfully");
-
Efficient Memory Usage:
- Added efficient memory usage feature with singleton pattern.
- Example:
use JSONize\App\Efficient\Response; $response = Response::getInstance(); $response->message("Deleted Successfully")->end();
-
Expanded HTTP Status Handling:
- Now supports all 3xx redirect status codes.
-
Improved JSON Response Formatting:
- Enhanced structure for better readability and consistency.
-
New Traits Added:
- Introduced
HasStatus
andMethodCaller
traits for dynamic method calls and enhanced status management.
- Introduced
-
Singleton Implementation:
- Ensured controlled instance creation with the new
Singleton
trait.
- Ensured controlled instance creation with the new
-
Bug Fixes:
- Corrected method naming inconsistencies and fixed HTTP status call issues in
HasStructure
.
- Corrected method naming inconsistencies and fixed HTTP status call issues in
Contributing
Contributions are welcome! Everyone who wants to contribute can add new HTTP status codes to this file: System/Traits/HasStatus.php
. Submit a pull request or open an issue for any problems or suggestions.
Upgrade now to streamline your JSON responses!
"JSONize: Standardizing PHP JSON Responses"
The JSONize project appears to be a well-structured and thoughtfully designed PHP library aimed at standardizing JSON responses. It employs several traits to manage attributes, statuses, and the overall structure of responses, ensuring consistency and ease of use. The use of the Singleton pattern and dynamic method calling adds flexibility and efficiency. The documentation is clear, making it accessible for developers. Overall, this project demonstrates good coding practices and provides a useful tool for PHP developers working with APIs and JSON responses.
VibeTiger v1.0.0 - Seamless VTiger CRM Integration
Ensure consistency in your applications with our streamlined library. Simplify data formatting, enhance readability, and save time. JSONize empowers developers to generate clean, organized JSON outputs, perfect for APIs, web, and mobile apps. Revolutionize your workflow today!