Commit 69ebe6d5 authored by Aaron Kuzemchak's avatar Aaron Kuzemchak

Allow Input::json() to return array instead of object

parent 2b1d8e6c
......@@ -102,13 +102,14 @@ class Input {
/**
* Get the JSON payload for the request.
*
* @param bool $as_array
* @return object
*/
public static function json()
public static function json($as_array = false)
{
if ( ! is_null(static::$json)) return static::$json;
return static::$json = json_decode(Request::foundation()->getContent());
return static::$json = json_decode(Request::foundation()->getContent(), $as_array);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment