public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { var value = reader.Value?.ToString(); if (value == null) { return(null); } var entityType = WebApiModelBindingRules.GetEntityType(objectType); return(parser.Parse(entityType, value)); }
public override bool CanConvert(Type objectType) => WebApiModelBindingRules.IsIdentityType(objectType);