On Sep 2, 2013, at 17:39 , Mysurf Mail <stammail...@gmail.com> wrote: > Hi, > I am having problems parsing suggest json response in c#. > Here is an example > > { > > - responseHeader: > { > - status: 0, > - QTime: 1 > }, > - spellcheck: > { > - suggestions: > [ > - "at", > - > { > - numFound: 1, > - startOffset: 1, > - endOffset: 3, > - suggestion: > [ > - "atrion" > ] > }, > - "l", > - > { > - numFound: 2, > - startOffset: 4, > - endOffset: 5, > - suggestion: > [ > - "lot", > - "loadtest_template_700" > ] > }, > - "collation", > - ""atrion lot"" > ] > } > > } > > 1. Is this a valid json? Shouldnt every item be surrounded by quatation > marks? > 2. The items "at" and "l" are not preceded by name. > (This generates different xml in every online json-to-xml translater. > Is this a standard json? > Can I interfere with the structure? > > Thanks.
The only problem I can see with that json structure is that it appears to have been pasted from a web browser, which has munged the actual data (adding spurious dashes and un-escaped quote characters). The hash-table syntax allows un-quoted names for the keys.