使用 Netwonsoft.JSON 库序列化对象时,可以使用JsonPropertyAttributeproperty指定输出顺序Order。但是,我还想在默认情况下按字母顺序对属性进行排序。
JsonPropertyAttribute
Order
.net c# serialization json json.net
.net ×1
c# ×1
json ×1
json.net ×1
serialization ×1