コード例 #1
0
            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);
            }
コード例 #2
0
ファイル: Json.cs プロジェクト: zunaalabaya/TAC-BOT
            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);
                }
            }
コード例 #3
0
            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);
            }
コード例 #4
0
            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);
            }
コード例 #5
0
            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);
            }
コード例 #6
0
            // 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);
            }
コード例 #7
0
            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);
            }
コード例 #8
0
ファイル: Json.cs プロジェクト: zunaalabaya/TAC-BOT
            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);
            }
コード例 #9
0
            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;
                }
                }
            }
コード例 #10
0
ファイル: Json.cs プロジェクト: lsx6244413/UnityDecomplie
            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);
            }
コード例 #11
0
            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);
            }
コード例 #12
0
            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);
            }
コード例 #13
0
            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);
            }
コード例 #14
0
ファイル: Json.cs プロジェクト: nowcoder001/dragonnest_src
            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);
            }
コード例 #15
0
            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);
            }
コード例 #16
0
ファイル: Json.cs プロジェクト: mdX7/WoWLegionCompanion
            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);
            }
コード例 #17
0
            // 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);
            }
コード例 #18
0
ファイル: Json.cs プロジェクト: lsx6244413/UnityDecomplie
            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);
            }
コード例 #19
0
            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);
            }
コード例 #20
0
            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);
            }
コード例 #21
0
ファイル: Json.cs プロジェクト: Hengle/swc-decompiled
            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);
            }
コード例 #22
0
            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;
                    }
                }
            }
コード例 #23
0
ファイル: Json.cs プロジェクト: mdX7/WoWLegionCompanion
            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);
            }
コード例 #24
0
 private object ParseValue()
 {
     Json.Parser.TOKEN nextToken = this.NextToken;
     return(this.ParseByToken(nextToken));
 }