I want the response like below JSON formate, how to do.
{"Spans":[
{
"Cant":0.0,
"ContactHeight":5935.0,
"CatenaryHeight":5935.0,
"Stagger":-717.0,
"Kilometerage":26.714,
"TrackName":"1100",
"RouteId":"LEC1",
"StructureName":"G-17-5"
},
{
"Length":62000.0,
"Versine":0.0,
"Features":null,
"SpanType":"AnchorSpan"
},
]
}
this is class that I have created
- public class SpansItem
- {
- public int Cant { get; set; }
- public int ContactHeight { get; set; }
- public int CatenaryHeight { get; set; }
- /
- public int Stagger { get; set; }
- public double Kilometerage { get; set; }
- public string TrackName { get; set; }
- public string RouteId { get; set; }
- public string StructureName { get; set; }
- }
- public class Root
- {
- public List <SpansItem > Spans { get; set; }
- }