support serializing arrays as top level object