src/Application.php
public function json($uriPattern, callable $controller)
    {
        return new IRoutePatternSetterAdapter(
            $this->getFrontController()->addController($uriPattern, $controller, '', 'application/json')->getPattern()
        );
    }
public function json($uriPattern, callable $controller)
    {
        return new IRoutePatternSetterAdapter(
            $this->getFrontController()->addController($uriPattern, $controller, '', 'application/json')->getPattern()
        );
    }
public function json ( $ uriPattern , callable $ controller ) { return new IRoutePatternSetterAdapter ( $ this -> getFrontController ( ) -> addController ( $ uriPattern , $ controller , '' , 'application/json' ) -> getPattern ( ) ) ; }
Adds a controller with a json format.

@param string $uriPattern
@param callable $controller
@return IRoutePatternSetter
Adds a controller with a json format .