https://github.com/sebk69/swoft-json-response
Shortcut to create Response in json format easy
https://github.com/sebk69/swoft-json-response
php swoft
Last synced: 8 days ago
JSON representation
Shortcut to create Response in json format easy
- Host: GitHub
- URL: https://github.com/sebk69/swoft-json-response
- Owner: sebk69
- License: gpl-3.0
- Created: 2021-10-20T07:51:29.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-02T05:49:29.000Z (over 4 years ago)
- Last Synced: 2025-07-12T14:55:29.276Z (11 months ago)
- Topics: php, swoft
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sebk/swoft-json-response
Json reponse for Swoft
## Install
Create your Swoft project : http://swoft.io/docs/2.x/en/quick-start/install.html
Require Swoft Json Response package (https://github.com/sebk69/swoft-json-response) :
```
composer require sebk/swoft-json-response
```
## Documentation
Simple function JsonResponse.
Usage :
```
JsonResponse($serializable);
// Example
JsonResponse(['test' => 'This is a test']);
```
You can use any serializable for parameter $serializable.
The '\JsonSerializable' interface is supported.