Exemple #1
0
 private Number readNumber(JsonLexer lexer) throws ParseException {
   expectCurrentToken(lexer, NUMBER);
   Number num = (Number) lexer.getValue();
   lexer.moveNext();
   return new BigDecimal(num.toString());
 }
Exemple #2
0
 private String readString(JsonLexer lexer) throws ParseException {
   expectCurrentToken(lexer, STRING);
   String str = unescape((String) lexer.getValue());
   lexer.moveNext();
   return str.toString();
 }
Exemple #3
0
 private Boolean readBoolean(JsonLexer lexer) throws ParseException {
   expectCurrentToken(lexer, BOOLEAN);
   Boolean bool = (Boolean) lexer.getValue();
   lexer.moveNext();
   return bool;
 }