I have a deserialize Json C# class now i want to fetch information from it -



I have a deserialize Json C# class now i want to fetch information from it -

this deserialize json response c# class

public class apppage { public pagelayout[] pagelayouts { get; set; } public string pagename { get; set; } public string pagetype { get; set; } } public class pagelayout { public string layout { get; set; } public pagecontrol[] pagecontrols { get; set; } } public class pagecontrol { public string __type { get; set; } public string controltype { get; set; } public int height { get; set; } public int pageid { get; set; } public bool visible { get; set; } public int width { get; set; } public string text { get; set; } public string textcolor { get; set; } public string type { get; set; } public bool autosize { get; set; } public string labelposition { get; set; } public bool showlabel { get; set; } }

what want similar did in javascript

e.g : pagelayout[0].pagecontrol[1].pageid.

can this c# class.

on deserialized object, should able similar, although naming different in c# representation. instead of 'pagelayout' have 'pagelayouts' , instead of 'pagecontrol' have 'pagecontrols'. work in case accessing pageid?

pagelayouts[0].pagecontrols[1].pageid

c# json

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -