private String readStringInternal() throws IOException { read(); startCapture(); while (current != '"') { if (current == '\\') { pauseCapture(); readEscape(); startCapture(); } else if (current < 0x20) { throw expected("valid string character"); } else { read(); } } String string = endCapture(); read(); return string; }
private void readNumber() throws IOException { handler.startNumber(); startCapture(); readChar('-'); int firstDigit = current; if (!readDigit()) { throw expected("digit"); } if (firstDigit != '0') { while (readDigit()) { } } readFraction(); readExponent(); handler.endNumber(endCapture()); }
private JsonValue readNumber() throws IOException { startCapture(); readChar( '-' ); int firstDigit = current; if( !readDigit() ) { throw expected( "digit" ); } if( firstDigit != '0' ) { while( readDigit() ) { } } readFraction(); readExponent(); return new JsonNumber( endCapture() ); }
private String readStringInternal() throws IOException { read(); startCapture(); while (current != '"') { if (current == '\\') { pauseCapture(); readEscape(); startCapture(); } else if (current < 0x20) { throw expected("valid string character"); } else { read(); } } String string = endCapture(); read(); return string; }
private String readStringInternal() throws IOException { read(); startCapture(); while( current != '"' ) { if( current == '\\' ) { pauseCapture(); readEscape(); startCapture(); } else if( current < 0x20 ) { throw expected( "valid string character" ); } else { read(); } } String string = endCapture(); read(); return string; }
private String readStringInternal() throws IOException { read(); startCapture(); while (current != '"') { if (current == '\\') { pauseCapture(); readEscape(); startCapture(); } else if (current < 0x20) { throw expected("valid string character"); } else { read(); } } String string = endCapture(); read(); return string; }
private void readNumber() throws IOException { handler.startNumber(); startCapture(); readChar('-'); int firstDigit = current; if (!readDigit()) { throw expected("digit"); } if (firstDigit != '0') { while (readDigit()) { } } readFraction(); readExponent(); handler.endNumber(endCapture()); }
private void readNumber() throws IOException { handler.startNumber(); startCapture(); readChar('-'); int firstDigit = current; if (!readDigit()) { throw expected("digit"); } if (firstDigit != '0') { while (readDigit()) { } } readFraction(); readExponent(); handler.endNumber(endCapture()); }