gen: Sort keys in downloaded JSON to reduce diffs.
gen: Sort keys in downloaded JSON to reduce diffs.

There are spurious diffs to the downloaded JSON discovery documents
from one generator run to the next, leading to significant diffs
in the daily autogenerated updates (e.g.
https://code.googlesource.com/google-api-go-client/+/4c1b07210d562506ab52117997c3b7e294627ac9).
These changes are also pulled into any other repo that vendors (parts of)
this repo.

The underlying reason for the spurious diffs is that the
JSON document returned by the server is not sorted by key.
Furthermore, the ordering of keys changes seemingly arbitrarily between
downloads.

To get rid of these unnecessary diffs in the daily autogenerator updates,
this change sorts the keys in downloaded JSON discovery docs.

Change-Id: I9764f143124bd8f3c67ef09bc9258ba5977cd940
Reviewed-on: https://code-review.googlesource.com/22730
Reviewed-by: Jonathan Amsterdam <e3d3698b2ccd5955e4adf250d0785062d0f9018b@google.com>

googleapis/google-api-go-client,google/google-api-go-client,googleapis/google-api-go-client,google/google-api-go-client