Found a solution that works recursively:
$ jq --sort-keys \. data.json
If also wish to sort the arrays use:
$ jq --sort-keys 'walk(if type == "array" then sort else . end)' data.json