Support array as root element in JSON

Fixes #11169