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
In order to match existing files from a human perspective, it'd be helpful if the order of elements matched the field order in the classes involved. Either that or provide some other way to choose the ordering, though that seems simplest.
The text was updated successfully, but these errors were encountered:
Default Jackson settings work here, so that you can force alphabetic ordering, or specific custom order, both with @JsonPropertyOrder (word 'json' is there just for historical reasons).
There is also global setting, MappingFeature.SORT_PROPERTIES_ALPHABETICALLY to make alphabetic ordering the default.
The reason properties are not guaranteed to match declaration order is simply because JDK does not guarantee this ordering: and indeed with JDK 1.7, order in which Methods and Fields are returned by Reflection is arbitrary and unstable.
In order to match existing files from a human perspective, it'd be helpful if the order of elements matched the field order in the classes involved. Either that or provide some other way to choose the ordering, though that seems simplest.
The text was updated successfully, but these errors were encountered: