Closed FroggieFrog closed 7 months ago
Why JsonPropertyOrder
was added in the first place is explained in the first post.
Why I used int.MaxValue
is just for easier additions/modifications in the future. At the moment there is no dependency on the correct order of the modified/added properties.
So in the future it is easier to add new properties at the end of the class and you don't have to check for the correct new value.
This PR fixes a TODO comment. As mentioned all classes (in registration) do derive now from the base classes. The tests were adjusted accordingly.
The
[JsonPropertyOrder(int.MaxValue)]
is necessary, because otherwise the properties of the base class are serialized last and too many tests had to be adjusted.