Output JSON in a deterministic, alphabetical, way.

In this way if we change the order in which we set properties it
won't change the JSON of the test files and bloat our commits for
no reason.