diff --git a/Slim/Http/Request.php b/Slim/Http/Request.php index 1d9b89537..1b54f5c9d 100644 --- a/Slim/Http/Request.php +++ b/Slim/Http/Request.php @@ -182,7 +182,7 @@ public function __construct($method, UriInterface $uri, HeadersInterface $header } $this->registerMediaTypeParser('application/json', function ($input) { - return json_decode($input); + return json_decode($input, true); }); $this->registerMediaTypeParser('application/xml', function ($input) { @@ -191,7 +191,7 @@ public function __construct($method, UriInterface $uri, HeadersInterface $header $this->registerMediaTypeParser('application/x-www-form-urlencoded', function ($input) { parse_str($input, $data); - return (object)$data; + return $data; }); }