You need to use JsonPropertyAttribute.ItemConverterType
property:
class Example2
{
[JsonProperty (ItemConverterType = typeof(StringEnumConverter))]
public IList<Size> Sizes { get; set; }
}
More Related Contents:
- How to set custom JsonSerializerSettings for Json.NET in ASP.NET Web API?
- Specifying a custom DateTime format when serializing with Json.Net
- How to write a JSON file in C#?
- JSON.NET Parser *seems* to be double serializing my objects
- Web API 2: how to return JSON with camelCased property names, on objects and their sub-objects
- What is the difference between PreserveReferencesHandling and ReferenceLoopHandling in Json.Net?
- Set default global json serializer settings
- Self referencing loop detected – Getting back data from WebApi to the browser
- Selectively use default JSON converter
- JSON serialize properties on class inheriting list [duplicate]
- Web API: Configure JSON serializer settings on action or controller level
- JSON Deserialization – String Is Automatically Converted To Int
- Is there a way in Json.NET serialization to distinguish between “null because not present” and “null because null”?
- How to implement custom JsonConverter in JSON.NET?
- Make Https call using HttpClient
- Using JsonConvert.DeserializeObject to deserialize Json to a C# POCO class
- JSON.Net Self referencing loop detected
- Newtonsoft JSON dynamic property name
- Find and return JSON differences using newtonsoft in C#?
- Convert DataTable to JSON with key per row
- How to add Web API to an existing ASP.NET MVC (5) Web Application project?
- Simple JWT authentication in ASP.NET Core 1.0 Web API
- Json.net serialize numeric properties as string
- Get the current user, within an ApiController action, without passing the userID as a parameter
- How to use DI container when OwinStartup
- How to deserialize a property with a dash (“-”) in its name with NewtonSoft JsonConvert?
- AngularJS Web Api AntiForgeryToken CSRF
- WebAPI Request Streaming support
- Generate JSON object with NewtonSoft in a single line
- How to use caching in ASP.NET Web API?