Skip to content

Issue 105 #62

Closed
wants to merge 2 commits into from
View
12 src/java/voldemort/serialization/json/JsonReader.java
@@ -248,14 +248,14 @@ else if('A' <= current() && 'F' >= current())
public Number readNumber() {
skipWhitespace();
- int intPiece = readInt();
+ long longPiece = readLong();
// if int is all we have, return it
if(isTerminator(current()))
- return intPiece;
+ return longPiece;
// okay its a double, check for exponent
- double doublePiece = intPiece;
+ double doublePiece = longPiece;
if(current() == '.')
doublePiece += readFraction();
if(current() == 'e' || current() == 'E') {
@@ -276,9 +276,9 @@ private boolean isTerminator(int ch) {
|| ch == ',' || ch == -1;
}
- public int readInt() {
+ public long readLong() {
skipWhitespace();
- int val = 0;
+ long val = 0;
boolean isPositive;
if(current() == '-') {
isPositive = false;
@@ -307,6 +307,8 @@ public int readInt() {
return val;
}
+
+
public double readFraction() {
skip('.');
double position = 0.1;
Something went wrong with that request. Please try again.