I am looking for an enhancement to JSON that will also serialize methods. I have an object that acts as a collection of objects, and would like to serialize the methods of
If you use WCF framework to develop RESTful web service, that is very easy to achieve. Simply create your data structure classes with your desired collection with DataContract, DataMember attributes.
[DataContract]
public class Foo
{
[DataMember]
public string FooName {get;set;}
[DataMember]
public FooItem[] FooItems {get;set;}
}
[DataContract]
public class FooItem
{
[DataMember]
public string Name {get;set;}
}