System.Text.Json.Serialization Order of serialized properties #1085
Labels
area-System.Text.Json
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
I'm missing an attribute for setting the order of the element in the JSON output.
Example:
I want the
@SEGMENT
to be the first element in the serialized JSON output of MyClass:The result when serializing MyClass is:
I would like the serialized JSON output to be:
or
Json.NET has an attribute for this: https://www.newtonsoft.com/json/help/html/JsonPropertyOrder.htm
Related question: .NET core 3: Order of serialization for JsonPropertyName (System.Text.Json.Serialization)
The text was updated successfully, but these errors were encountered: