Skip to content

About

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

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

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

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages