Hey, super newbie question. Consider the following WCF function:
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityReq
DataContractJsonSerializer serializer = new DataContractJsonSerializer(MyClass.GetType());
MemoryStream ms = new MemoryStream();
serializer.WriteObject(ms, MyClass);
string JsonString = Encoding.Default.GetString(ms.ToArray());
Run the above code, will get to know how the JSON looks like... where MyClass
is the object of any class