c# - Json response with several tables(?) -



c# - Json response with several tables(?) -

how parse json response in form of:

www.extradelar.se/match

if understand response right, array of 3 responses, how parse them in case? how deserialize rootobject?

i not sure if due re-create paste json provided not valid:

using http://jsonlint.com/ can validate indent json:

once indent, easier @ .

the above json array of array each 1 contains object.

it little odd usual json, maybe have own reasons.

using libraries json.net can parse info c# objects.

hope helps

edit:

poco class:

public class rootobject { public string match_id { get; set; } public string no_repick { get; set; } public string no_agi { get; set; } public string drp_itm { get; set; } public string no_timer { get; set; } public string rev_hs { get; set; } public string no_swap { get; set; } public string no_int { get; set; } public string alt_pick { get; set; } public string veto { get; set; } public string shuf { get; set; } public string no_str { get; set; } public string no_pups { get; set; } public string dup_h { get; set; } public string ap { get; set; } public string br { get; set; } public string em { get; set; } public string cas { get; set; } public string rs { get; set; } public string nl { get; set; } public string officl { get; set; } public string no_stats { get; set; } public string ab { get; set; } public string hardcore { get; set; } public string dev_heroes { get; set; } public string verified_only { get; set; } public string gated { get; set; } }

json.net

private string getmatchid() { using (var webclient = new system.net.webclient()) { const string url = @"http://www.extradelar.se/match"; var json = webclient.downloadstring(url); var matchen = jsonconvert.deserializeobject<list<list<rootobject>>>(json); var matchid = matchen[0][0].match_id; homecoming matchid; } }

c# asp.net json

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -