public class OutputJson
{
public List<Entity> Android { get; set; }
}
public class Entity
{
public string Name { get; set; }
public string Version { get; set; }
}
public class Newclass {
public string GetJson()
{
var outputJson = new OutputJson()
{
Android = new List<Entity>
{
new Entity { Name = "aaa", Version = "123"},
new Entity { Name = "bb", Version = "34"},
new Entity { Name = "cc", Version = "56"},
}
};
JavaScriptSerializer serializer = new JavaScriptSerializer();
string Jsonstring = serializer.Serialize(outputJson);