I tryed Serialize my List of phones:

in my application, i use javascriptSerializer in my controller:
[HttpGet]
public List<Phone> GetPhones()
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
var serializedResult = serializer.Serialize(new TestPhoneService().GetTestData());
return serializedResult;
}
My Method GetPhones() should return phones in json format, but i have error: Cannot implicitly convert type 'string' to 'System.Collections.Generic.List... May be somebody knows how i can configure javascript serializer for resolve it error ? Thanks for your Answers!
Serialize()returns astringtherefore yourserializedResultis astringand the return type of the method isList<Phone>. Change your method return type tostringif that is what you need.