in Json.net we can rename the property with [JsonPropertyAttribute("")],
public class Foo
{
public string Foo1 { set; get; }
public string Foo2 { set; get; }
}
and in the web service code behind:
[WebMethod]
public List<Foo> GetFoos()
{
List<Foo> post = new List<Foo>
{
new Foo(),
new Foo(),
new Foo()
};
return post;
}
Thank you,
-ali
source
share