Enum数组类型之序列化

今日遇一题,如何将Enum之数组序列化,尝用直用StringEnumConverter而未得解矣,后细查文档,当用ItemConverterType,而不可直用JsonConvert,依此而解。

[JsonProperty(PropertyName = “XXXX”, ItemConverterType=typeof(StringEnumConverter))]

Leave a Reply

Your email address will not be published. Required fields are marked *