Playtomic.JSON.ParseValue C# (CSharp) Method

ParseValue() protected method

protected ParseValue ( char json, int &index, bool &success ) : object
json char
index int
success bool
return object
        protected object ParseValue(char[] json, ref int index, ref bool success)
        {
            switch (LookAhead(json, index)) {
                case JSON.TOKEN_STRING:
                    return ParseString(json, ref index);
                case JSON.TOKEN_NUMBER:
                    return ParseNumber(json, ref index);
                case JSON.TOKEN_CURLY_OPEN:
                    return ParseObject(json, ref index);
                case JSON.TOKEN_SQUARED_OPEN:
                    return ParseArray(json, ref index);
                case JSON.TOKEN_TRUE:
                    NextToken(json, ref index);
                    return Boolean.Parse("TRUE");
                case JSON.TOKEN_FALSE:
                    NextToken(json, ref index);
                    return Boolean.Parse("FALSE");
                case JSON.TOKEN_NULL:
                    NextToken(json, ref index);
                    return null;
                case JSON.TOKEN_NONE:
                    break;
            }

            success = false;
            return null;
        }