Ejemplo n.º 1
0
        private JsonToken DoFalseLiteral()
        {
            JsonToken token  = JsonToken.INVALID;
            int       length = Literals.FALSE_LENGTH;
            // char[] c = nextChars(length);
            CyclicCharArray c = NextCharsInQueue(length);

            if (LiteralUtil.IsFalse(c))
            {
                token = TokenPool.TOKEN_FALSE;
                // nextToken = null;
            }
            else
            {
                // throw new JsonException("Unexpected string: " + Arrays.ToString(c), tailCharStream());
                throw new DotJsonMiniException("Unexpected string: ");
            }
            return(token);
        }
Ejemplo n.º 2
0
        private JsonToken DoFalseLiteral()
        {
            JsonToken token  = JsonToken.INVALID;
            int       length = Literals.FALSE_LENGTH;
            // char[] c = nextChars(length);
            CyclicCharArray c = NextCharsInQueue(length);

            if (parserPolicy.CaseInsensitiveLiterals ? LiteralUtil.IsFalseIgnoreCase(c) : LiteralUtil.IsFalse(c))
            {
                token = TokenPool.TOKEN_FALSE;
                // nextToken = null;
            }
            else
            {
                // throw new UnexpectedSymbolException("Unexpected string: " + Arrays.toString(c), GetTailCharStream(), PeekCharStream());
                throw new UnexpectedSymbolException("Unexpected string: " + (c == null ? "" : c.ToString()), GetTailCharStream(), PeekCharStream());
            }
            return(token);
        }