private List <object> ParseArray() { List <object> list = new List <object>(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; Json.Parser.TOKEN tOKEN = nextToken; switch (tOKEN) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; continue; case Json.Parser.TOKEN.COLON: IL_38: if (tOKEN != Json.Parser.TOKEN.NONE) { object obj = this.ParseByToken(nextToken); list.Add(obj); continue; } return(null); case Json.Parser.TOKEN.COMMA: continue; } goto IL_38; } return(list); }
private object ParseByToken(Json.Parser.TOKEN token) { switch (token) { case Json.Parser.TOKEN.CURLY_OPEN: return((object)this.ParseObject()); case Json.Parser.TOKEN.SQUARED_OPEN: return((object)this.ParseArray()); case Json.Parser.TOKEN.STRING: return((object)this.ParseString()); case Json.Parser.TOKEN.NUMBER: return(this.ParseNumber()); case Json.Parser.TOKEN.TRUE: return((object)true); case Json.Parser.TOKEN.FALSE: return((object)false); case Json.Parser.TOKEN.NULL: return((object)null); default: return((object)null); } }
private List <object> ParseArray() { List <object> list = new List <object>(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; if (nextToken == Json.Parser.TOKEN.NONE) { return(null); } if (nextToken != Json.Parser.TOKEN.SQUARED_CLOSE) { if (nextToken != Json.Parser.TOKEN.COMMA) { object item = this.ParseByToken(nextToken); list.Add(item); } } else { flag = false; } } return(list); }
private ArrayList ParseArray() { ArrayList arrayList = new ArrayList(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; Json.Parser.TOKEN tOKEN = nextToken; switch (tOKEN) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; continue; case Json.Parser.TOKEN.COLON: IL_38: if (tOKEN != Json.Parser.TOKEN.NONE) { object value = this.ParseByToken(nextToken); arrayList.Add(value); continue; } return(null); case Json.Parser.TOKEN.COMMA: continue; } goto IL_38; } return(arrayList); }
private List <object> ParseArray() { List <object> list = new List <object>(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; continue; case Json.Parser.TOKEN.COLON: IL_34: if (nextToken != Json.Parser.TOKEN.NONE) { object item = this.ParseByToken(nextToken); list.Add(item); continue; } return(null); case Json.Parser.TOKEN.COMMA: continue; default: goto IL_34; } } return(list); }
// Token: 0x06000135 RID: 309 RVA: 0x00004288 File Offset: 0x00002488 private List <object> ParseArray() { List <object> list = new List <object>(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; break; default: { if (nextToken == Json.Parser.TOKEN.NONE) { return(null); } object item = this.ParseByToken(nextToken); list.Add(item); break; } case Json.Parser.TOKEN.COMMA: break; } } return(list); }
private List <object> ParseArray() { List <object> list = new List <object>(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; Json.Parser.TOKEN tOKEN = nextToken; if (tOKEN == Json.Parser.TOKEN.NONE) { return(null); } switch (tOKEN) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; continue; case Json.Parser.TOKEN.COMMA: continue; } object item = this.ParseByToken(nextToken); list.Add(item); } return(list); }
private List <object> ParseArray() { List <object> objectList = new List <object>(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; Json.Parser.TOKEN token = nextToken; switch (token) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; continue; case Json.Parser.TOKEN.COMMA: continue; default: if (token == Json.Parser.TOKEN.NONE) { return((List <object>)null); } object byToken = this.ParseByToken(nextToken); objectList.Add(byToken); continue; } } return(objectList); }
private object ParseByToken(Json.Parser.TOKEN token) { switch (token) { case Json.Parser.TOKEN.STRING: { return(this.ParseString()); } case Json.Parser.TOKEN.NUMBER: { return(this.ParseNumber()); } case Json.Parser.TOKEN.TRUE: { return(true); } case Json.Parser.TOKEN.FALSE: { return(false); } case Json.Parser.TOKEN.NULL: { return(null); } default: { switch (token) { case Json.Parser.TOKEN.CURLY_OPEN: { return(this.ParseObject()); } case Json.Parser.TOKEN.CURLY_CLOSE: { return(null); } case Json.Parser.TOKEN.SQUARED_OPEN: { return(this.ParseArray()); } default: { return(null); } } break; } } }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_3A; case Json.Parser.TOKEN.CURLY_OPEN: { IL_2E: if (nextToken == Json.Parser.TOKEN.COMMA) { continue; } string text = this.ParseString(); if (text == null) { goto Block_2; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_3; } this.json.Read(); dictionary[text] = this.ParseValue(); continue; } case Json.Parser.TOKEN.CURLY_CLOSE: goto IL_46; } goto IL_2E; } IL_3A: Dictionary <string, object> result = null; return(result); IL_46: result = dictionary; return(result); Block_2: result = null; return(result); Block_3: result = null; return(result); }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> table = new Dictionary <string, object>(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_35; case Json.Parser.TOKEN.CURLY_OPEN: break; case Json.Parser.TOKEN.CURLY_CLOSE: goto IL_3B; default: if (nextToken == Json.Parser.TOKEN.COMMA) { continue; } break; } string name = this.ParseString(); if (name == null) { goto Block_3; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_4; } this.json.Read(); table[name] = this.ParseValue(); } IL_35: Dictionary <string, object> result = null; return(result); IL_3B: result = table; return(result); Block_3: result = null; return(result); Block_4: result = null; return(result); }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_37; case Json.Parser.TOKEN.CURLY_OPEN: { IL_2B: if (nextToken == Json.Parser.TOKEN.COMMA) { continue; } string text = this.ParseString(); if (text == null) { goto Block_2; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_3; } this.json.Read(); dictionary.set_Item(text, this.ParseValue()); continue; } case Json.Parser.TOKEN.CURLY_CLOSE: return(dictionary); } goto IL_2B; } IL_37: return(null); Block_2: return(null); Block_3: return(null); }
private Hashtable ParseObject() { Hashtable hashtable = new Hashtable(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_37; case Json.Parser.TOKEN.CURLY_OPEN: { IL_2B: if (nextToken == Json.Parser.TOKEN.COMMA) { continue; } string text = this.ParseString(); if (text == null) { goto Block_2; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_3; } this.json.Read(); hashtable[text] = this.ParseValue(); continue; } case Json.Parser.TOKEN.CURLY_CLOSE: return(hashtable); } goto IL_2B; } IL_37: return(null); Block_2: return(null); Block_3: return(null); }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_31; case Json.Parser.TOKEN.CURLY_OPEN: break; case Json.Parser.TOKEN.CURLY_CLOSE: return(dictionary); default: if (nextToken == Json.Parser.TOKEN.COMMA) { continue; } break; } string text = this.ParseString(); if (text == null) { goto Block_3; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_4; } this.json.Read(); dictionary[text] = this.ParseValue(); } IL_31: return(null); Block_3: return(null); Block_4: return(null); }
private JsonNode ParseObject() { JsonNode jsonNode = new JsonNode(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: { return(null); } case Json.Parser.TOKEN.CURLY_CLOSE: { return(jsonNode); } default: { if (nextToken == Json.Parser.TOKEN.COMMA) { continue; } else { string str = this.ParseString(); if (str == null) { return(null); } if (this.NextToken != Json.Parser.TOKEN.COLON) { return(null); } this.json.Read(); jsonNode[str] = this.ParseValue(); continue; } } } } return(null); }
private JsonNode ParseObject() { JsonNode jsonNode = new JsonNode(); this.json.Read(); for (;;) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_37; default: if (nextToken != Json.Parser.TOKEN.COMMA) { string text = this.ParseString(); if (text == null) { goto Block_2; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_3; } this.json.Read(); jsonNode[text] = this.ParseValue(); } break; case Json.Parser.TOKEN.CURLY_CLOSE: return(jsonNode); } } IL_37: return(null); Block_2: return(null); Block_3: return(null); }
// Token: 0x06000134 RID: 308 RVA: 0x000041FC File Offset: 0x000023FC private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); for (;;) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.NONE: goto IL_37; default: if (nextToken != Json.Parser.TOKEN.COMMA) { string text = this.ParseString(); if (text == null) { goto Block_2; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_3; } this.json.Read(); dictionary[text] = this.ParseValue(); } break; case Json.Parser.TOKEN.CURLY_CLOSE: return(dictionary); } } IL_37: return(null); Block_2: return(null); Block_3: return(null); }
private object ParseByToken(Json.Parser.TOKEN token) { object result; switch (token) { case Json.Parser.TOKEN.STRING: result = this.ParseString(); break; case Json.Parser.TOKEN.NUMBER: result = this.ParseNumber(); break; case Json.Parser.TOKEN.TRUE: result = true; break; case Json.Parser.TOKEN.FALSE: result = false; break; case Json.Parser.TOKEN.NULL: result = null; break; default: switch (token) { case Json.Parser.TOKEN.CURLY_OPEN: result = this.ParseObject(); return(result); case Json.Parser.TOKEN.SQUARED_OPEN: result = this.ParseArray(); return(result); } result = null; break; } return(result); }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); for (; ;) { Json.Parser.TOKEN nextToken = this.NextToken; if (nextToken == Json.Parser.TOKEN.NONE) { goto IL_54; } if (nextToken == Json.Parser.TOKEN.CURLY_CLOSE) { break; } if (nextToken != Json.Parser.TOKEN.COMMA) { string text = this.ParseString(); if (text == null) { goto IL_56; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto IL_58; } this.json.Read(); dictionary[text] = this.ParseValue(); } } return(dictionary); IL_54: return(null); IL_56: return(null); IL_58: return(null); }
private List <object> ParseArray() { List <object> array = new List <object>(); this.json.Read(); bool parsing = true; List <object> result; while (parsing) { Json.Parser.TOKEN nextToken = this.NextToken; Json.Parser.TOKEN tOKEN = nextToken; if (tOKEN == Json.Parser.TOKEN.NONE) { result = null; return(result); } switch (tOKEN) { case Json.Parser.TOKEN.SQUARED_CLOSE: parsing = false; break; case Json.Parser.TOKEN.COLON: goto IL_49; case Json.Parser.TOKEN.COMMA: break; default: goto IL_49; } continue; IL_49: object value = this.ParseByToken(nextToken); array.Add(value); } result = array; return(result); }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; if (nextToken == Json.Parser.TOKEN.NONE) { break; } if (nextToken == Json.Parser.TOKEN.CURLY_CLOSE) { return(dictionary); } if (nextToken != Json.Parser.TOKEN.COMMA) { string text = this.ParseString(); if (text == null) { goto Block_4; } if (this.NextToken != Json.Parser.TOKEN.COLON) { goto Block_5; } this.json.Read(); dictionary[text] = this.ParseValue(); } } return(null); Block_4: return(null); Block_5: return(null); }
private Dictionary <string, object> ParseObject() { Dictionary <string, object> dictionary = new Dictionary <string, object>(); this.json.Read(); while (true) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case TOKEN.NONE: return(null); case TOKEN.COMMA: continue; case TOKEN.CURLY_CLOSE: return(dictionary); default: string name = ParseString(); if (name == null) { return(null); } if (NextToken != TOKEN.COLON) { return(null); } // ditch the colon this.json.Read(); // value dictionary[name] = ParseValue(); break; } } }
private JsonList ParseArray() { JsonList jsonList = new JsonList(); this.json.Read(); bool flag = true; while (flag) { Json.Parser.TOKEN nextToken = this.NextToken; switch (nextToken) { case Json.Parser.TOKEN.SQUARED_CLOSE: flag = false; break; default: { if (nextToken == Json.Parser.TOKEN.NONE) { return(null); } object obj = this.ParseByToken(nextToken); jsonList.Add(obj); if (obj == null) { this.json.Read(); } break; } case Json.Parser.TOKEN.COMMA: break; } } return(jsonList); }
private object ParseValue() { Json.Parser.TOKEN nextToken = this.NextToken; return(this.ParseByToken(nextToken)); }