For interoperability it would be best if metadata was always an object at the top-level, enforce this in the schema - see https://github.com/tskit-dev/tskit/pull/601#issuecomment-632358574 for details.