You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OutputFormatting.sortedKeys option for JSONEncoder doesn't apply to keys in a nested dictionary field, which makes it impossible to write deterministic tests against the resulting JSON output.
FWIW, as described in SR-7788, a dictionary with non-String/non-Int key is encoded as an array of key-value pairs. JSONEncoder cannot know it was a dictionary or an array.
Environment
MacOS Catalina 10.15.6
Xcode 11.6 (11E708) which I think is Swift 5.2
Additional Detail from JIRA
md5: 2f4be0e23a94302b63fa5a92e04fe1e2
Issue Description:
The OutputFormatting.sortedKeys option for JSONEncoder doesn't apply to keys in a nested dictionary field, which makes it impossible to write deterministic tests against the resulting JSON output.
The text was updated successfully, but these errors were encountered: