private JsonToken DoNullLiteral() { JsonToken token = JsonToken.INVALID; int length = Literals.NULL_LENGTH; // char[] c = nextChars(length); CyclicCharArray c = NextCharsInQueue(length); if (LiteralUtil.IsNull(c)) { token = TokenPool.TOKEN_NULL; // nextToken = null; } else { // throw new JsonException("Unexpected string: " + Arrays.ToString(c), tailCharStream()); throw new DotJsonMiniException("Unexpected string: "); } return(token); }
private JsonToken DoNullLiteral() { JsonToken token = JsonToken.INVALID; int length = Literals.NULL_LENGTH; // char[] c = nextChars(length); CyclicCharArray c = NextCharsInQueue(length); if (parserPolicy.CaseInsensitiveLiterals ? LiteralUtil.IsNullIgnoreCase(c) : LiteralUtil.IsNull(c)) { token = TokenPool.TOKEN_NULL; // 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); }