Quantcast
Channel: Json.NET
Viewing all articles
Browse latest Browse all 1767

Created Unassigned: ShouldSerialize{Property} not working if the method is virtual [25421]

$
0
0
public class A
{
}

public class B
{
public A A { get; set;}
public virtual bool ShouldSerializeA()
{
return false;
}
}

Using version 6.0.2 this fails since the ShouldSerializeA is never called. If I make the method non virtual then it works.

Viewing all articles
Browse latest Browse all 1767


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>