protected static object parseValue(char[] json, ref int index, ref bool success) { switch (MUJson.lookAhead(json, index)) { case 1: return(MUJson.parseObject(json, ref index)); case 3: return(MUJson.parseArray(json, ref index)); case 7: return(MUJson.parseString(json, ref index)); case 8: return(MUJson.parseNumber(json, ref index)); case 9: MUJson.nextToken(json, ref index); return(bool.Parse("TRUE")); case 10: MUJson.nextToken(json, ref index); return(bool.Parse("FALSE")); case 11: MUJson.nextToken(json, ref index); return(null); } success = false; return(null); }
protected static Hashtable parseObject(char[] json, ref int index) { Hashtable hashtable = new Hashtable(); MUJson.nextToken(json, ref index); bool flag = false; while (!flag) { int num = MUJson.lookAhead(json, index); if (num == 0) { return(null); } if (num == 6) { MUJson.nextToken(json, ref index); } else { if (num == 2) { MUJson.nextToken(json, ref index); return(hashtable); } string text = MUJson.parseString(json, ref index); if (text == null) { return(null); } num = MUJson.nextToken(json, ref index); if (num != 5) { return(null); } bool flag2 = true; object value = MUJson.parseValue(json, ref index, ref flag2); if (!flag2) { return(null); } hashtable[text] = value; } } return(hashtable); }
// Token: 0x06000166 RID: 358 RVA: 0x0000F514 File Offset: 0x0000D714 protected static ArrayList parseArray(char[] json, ref int index) { ArrayList arrayList = new ArrayList(); MUJson.nextToken(json, ref index); bool flag = false; while (!flag) { int num = MUJson.lookAhead(json, index); if (num == 0) { return(null); } if (num == 6) { MUJson.nextToken(json, ref index); } else { if (num == 4) { MUJson.nextToken(json, ref index); break; } bool flag2 = true; object value = MUJson.parseValue(json, ref index, ref flag2); if (!flag2) { return(null); } arrayList.Add(value); } } return(arrayList); }