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
sheriff.Marshal() uses as a target a map[string]interface{} to achieve the flexibility it needs to do it's job. json.Marshal sorts maps. I'm not aware of a way to keep the original order.
If you know a way, please propose a solution and we can talk about a PR. Or submit a PR directly but depending on the complexity I may decline to merge it.
Reasoning behind is that while it may be slightly annoying, JSON is a format mostly read by machines and not by humans and for machines order does not matter.
The usage of
sheriff.Marshal(options, data)
reorganizes the fields alphabetically instead of keeping the original order. (v2.0.0-beta.1)Expected
Actual behavior
The text was updated successfully, but these errors were encountered: