I have 2 json
{ "B1": "some string" }
and
{ "B1": {"I1": 1, "I2": 2 } }
Is there a way - (through Attributes probably) to map Deserializing to such .NET objects. If string than data goes to B1_String, otherwise to B1.
public class A
{
public string B1_String;
public B B1;
}
public class B
{
public int I1; public int I2;
}