protected String exceptionDetails( String message ) { return characterSource.errorDetails ( message ); }
private String decodeString() { CharacterSource characterSource = this.characterSource; characterSource.nextChar(); char [] chars = characterSource.findNextChar ( '"', '\\' ); String value = null; if ( characterSource.hadEscape() ) { value = builder.decodeJsonString ( chars ).toString (); builder.recycle (); } else { value = new String( chars ); } return value; }
if ( this.characterSource.currentChar() == '[' ) { characterSource.nextChar(); characterSource.skipWhiteSpace (); if ( this.characterSource.currentChar() == ']' ) { characterSource.nextChar(); return Collections.EMPTY_LIST; characterSource.skipWhiteSpace (); characterSource.skipWhiteSpace (); int c = characterSource.currentChar(); characterSource.nextChar(); continue; } else if ( c == CLOSED_BRACKET ) { foundEnd = true; characterSource.nextChar(); break; } else { } while ( characterSource.hasChar () );
private final Object decodeValue() { CharacterSource characterSource = this.characterSource; Object value = null; characterSource.skipWhiteSpace (); switch ( characterSource.currentChar () ) {
protected final boolean decodeFalse() { if ( characterSource.consumeIfMatch ( FALSE ) ) { return false; } else { throw new JsonException( exceptionDetails( "false not parsed properly" ) ); } }
private final Object decodeNumber(boolean negative) { char[] chars = characterSource.readNumber (); Object value = null; if ( CharScanner.hasDecimalChar ( chars, negative ) ) { value = CharScanner.parseDouble( chars ); } else if (CharScanner.isInteger ( chars )) { value = CharScanner.parseInt ( chars ); } else if (CharScanner.isLong( chars )) { value = CharScanner.parseLong ( chars ); } return value; }
if ( this.characterSource.currentChar() == '[' ) { characterSource.nextChar(); characterSource.skipWhiteSpace (); if ( this.characterSource.currentChar() == ']' ) { characterSource.nextChar(); return Collections.EMPTY_LIST; characterSource.skipWhiteSpace (); characterSource.skipWhiteSpace (); int c = characterSource.currentChar(); characterSource.nextChar(); continue; } else if ( c == CLOSED_BRACKET ) { foundEnd = true; characterSource.nextChar(); break; } else { } while ( characterSource.hasChar () );
private final Object decodeValue() { CharacterSource characterSource = this.characterSource; Object value = null; characterSource.skipWhiteSpace (); switch ( characterSource.currentChar () ) {
protected final boolean decodeFalse() { if ( characterSource.consumeIfMatch ( FALSE ) ) { return false; } else { throw new JsonException( exceptionDetails( "false not parsed properly" ) ); } }
private final Object decodeNumber(boolean negative) { char[] chars = characterSource.readNumber (); Object value = null; if ( CharScanner.hasDecimalChar ( chars, negative ) ) { value = CharScanner.parseDouble( chars ); } else if (CharScanner.isInteger ( chars )) { value = CharScanner.parseInt ( chars ); } else if (CharScanner.isLong( chars )) { value = CharScanner.parseLong ( chars ); } return value; }
if ( this.characterSource.currentChar() == '[' ) { characterSource.nextChar(); characterSource.skipWhiteSpace (); if ( this.characterSource.currentChar() == ']' ) { characterSource.nextChar(); return Collections.EMPTY_LIST; characterSource.skipWhiteSpace (); characterSource.skipWhiteSpace (); int c = characterSource.currentChar(); characterSource.nextChar(); continue; } else if ( c == CLOSED_BRACKET ) { foundEnd = true; characterSource.nextChar(); break; } else { } while ( characterSource.hasChar () );
private String decodeString() { CharacterSource characterSource = this.characterSource; characterSource.nextChar(); char [] chars = characterSource.findNextChar ( '"', '\\' ); String value = null; if ( characterSource.hadEscape() ) { value = builder.decodeJsonString ( chars ).toString (); builder.recycle (); } else { value = new String( chars ); } return value; }
private final Object decodeValue() { CharacterSource characterSource = this.characterSource; Object value = null; characterSource.skipWhiteSpace (); switch ( characterSource.currentChar () ) {
protected final boolean decodeTrue() { if ( characterSource.consumeIfMatch ( TRUE ) ) { return true; } else { throw new JsonException( exceptionDetails( "true not parsed properly" ) ); } }
private final Object decodeNumber(boolean negative) { char[] chars = characterSource.readNumber (); Object value = null; if ( CharScanner.hasDecimalChar ( chars, negative ) ) { value = CharScanner.parseDouble( chars ); } else if (CharScanner.isInteger ( chars )) { value = CharScanner.parseInt ( chars ); } else if (CharScanner.isLong( chars )) { value = CharScanner.parseLong ( chars ); } return value; }
protected String exceptionDetails( String message ) { return characterSource.errorDetails ( message ); }
if ( characterSource.currentChar() == '{' ) { characterSource.nextChar(); while (characterSource.hasChar()) { characterSource.skipWhiteSpace (); if ( characterSource.currentChar () == DOUBLE_QUOTE ) { characterSource.skipWhiteSpace (); if ( characterSource.currentChar() != COLON ) { complain( "expecting current character to be : but was " + charDescription( characterSource.currentChar() ) + "\n" ); characterSource.nextChar (); characterSource.skipWhiteSpace(); characterSource.skipWhiteSpace(); int ch = characterSource.currentChar(); if ( ch == '}' ) { characterSource.nextChar(); break; } else if ( ch == ',' ) { characterSource.nextChar(); continue; } else {
private String decodeString() { CharacterSource characterSource = this.characterSource; characterSource.nextChar(); char [] chars = characterSource.findNextChar ( '"', '\\' ); String value = null; if ( characterSource.hadEscape() ) { value = builder.decodeJsonString ( chars ).toString (); builder.recycle (); } else { value = new String( chars ); } return value; }
protected final Object decodeNull() { if ( !characterSource.consumeIfMatch ( NULL ) ) { throw new JsonException( exceptionDetails( "null not parse properly" ) ); } return null; }
protected String exceptionDetails( String message ) { return characterSource.errorDetails ( message ); }