Add support for array as root element in JSON