Allow to set response as php array (skip some json_encode/json_decode calls)

Refs #267.