Easy reordering of JSON for consistent approvals
The Problem:
JSON does not define an order to the fields.
This can make approving JSON inconsistent as ApprovalTests requires consistent results.
The Solution:
JsonApprovals.verifyJson(json)
now has an overload:
JsonApprovals.verifyJson(json, reorderJson: true)
which will alphabetically sort the JSON in the result.
By default it still does not reorder the JSON.
Extras
You can call the reordering directly with
JsonUtils.reorderFields(json)
This fixes #422