add support for JSON responses with root element