i'm trying to send data to wcf method, via ajax from client side
public class DynamicParse
{
// other properties
public dynamic Value {get;set;}
}
// wcf method
public void PostData(List<DynamicParse> list)
{
// parse list[0].Value
}
the javascript array that is sent to the wcf method:
var data = [{ Value : 1 }, { Value : "test" }, { Value : { message : "hello" } }];
my difficulty is how can i parse the data when the "Value" property is an object type-> { message : "hello" } from c#,
i tried reflection and json serialization and no success so far..
is there another option to parse the specified data without dynamic type? or is it suitable here for this problem?
thanks