Added detection of JSON responses that have an array as the top level.