Skip to content

JSON middleware, detects is Accept header is json-y and attempts to json encode the output.

License

Notifications You must be signed in to change notification settings

slimphp-api/slim-json

Repository files navigation

slim-json

Coverage Status Code Climate Build Status

JSON middleware that enforces a json response wherever possible. Based on Accept header

installation

composer require slimphp-api/slim-json

usage

Add middleware in the usual way. For slim:

use Slim\App;
$app = new App();
$app->add(new SlimApi\Json\Json);
$app->run();

About

JSON middleware, detects is Accept header is json-y and attempts to json encode the output.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages