Skip to content

Return a RESTFull JSON response. The response body contains 3 properties.

License

Notifications You must be signed in to change notification settings

SomePHP/JSONResponse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Return a RESTFull JSON response. The response body contains 3 properties.

  • data: request results.
  • error: error information. ex.[{code: 555, msg: 'No results Found'}]
  • meta: meta information about the response.

License

MIT - MIT License File: LICENSE

Examples

<?php
$resp = new JSONResponse();
$resp->data[] = 'one';
$resp->data[] = 'two';
$resp->send();

Installation

Composer

composer require somephp/jsonresponse

Contents

Resource Description

Contributions

Suggestions and code modifications are welcome. Create a merge request, and tell me what are thinking.

About

Return a RESTFull JSON response. The response body contains 3 properties.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages