Add sorting of keys to generate stable output.
Add a test of the actual output
Add checking for a single type in an array.