i have a json string with duplicated property name with different data types. if i removed all duplicated other data types, it will work fine.
{
"data":[
{
"ctr":0,
"spend":11839.8600,
"clicks":6402
},
{
"ctr":0,
"spend":12320.5000,
"clicks":5789
},
{
"clicks":{
"value":13156.0,
"prior_year":0.0,
"prior_month":14122.0,
"prior_month_perc":0.0684039087947882736156351792,
"prior_year_perc":0.0
}
}
],
"timing":null,
"warnings":[
],
"success":true
}
here is the my model class
public class MyTestModel
{
public int? ctr { get; set; }
public decimal? spend { get; set; }
public int? clicks { get; set; }
}
if i removed this snipped json part, program will work.
{
"clicks":{
"value":13156.0,
"prior_year":0.0,
"prior_month":14122.0,
"prior_month_perc":0.0684039087947882736156351792,
"prior_year_perc":0.0
}
are there any method to stop binding unsupported types to model property.