public static function decode($json, $assoc = false)
    {
        if ($json instanceof Response) {
            return json_decode($json->getContent(), $assoc);
        }

        return json_decode($json, $assoc);
    }
public static function decode($json, $assoc = false)
    {
        if ($json instanceof Response) {
            return json_decode($json->getContent(), $assoc);
        }

        return json_decode($json, $assoc);
    }
public static function decode ( $ json , $ assoc = false ) { if ( $ json instanceof Response ) { return json_decode ( $ json -> getContent ( ) , $ assoc ) ; } return json_decode ( $ json , $ assoc ) ; }
Decode a json, unlike the build-in
decode, support a Response as argument

@param string|array|Response $json
@param boolean               $assoc

@return mixed
Decode a json unlike the build - in decode support a Response as argument