Root key configuration

Right now, the JSON generated always has a root key. This should be configurable for APIs that don't want to pass `root: nil` everywhere.

It may need 3 level of configuration:

- on: Always have a root key
- off: Never have a root key
- auto: Have a root key for collections