slimphp-api/slim-json

A module for slim, JSON middleware for encoding based on Content-Type

dev-master 2015-11-21 00:02 UTC

This package is not auto-updated.

Last update: 2024-03-16 15:30:33 UTC


README

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();