Response to JSON

It' useful to have the Response object encoded as Json Object.
Properties are protected, so it's not possible to convert the object just using the json_encode.