Having the following class:
class Test {
[MyAttr]
public string Name;
}
How can I extend JSON.NET if I need to trim values of all properties marked with MyAttr to specific length? Seems I can’t do that in custom JsonConverter as I need access to MemberInfo representing the origin property.
After deeper reading the documentation and source code it looks like contract resolver is the way to go:
As easy as pie!