You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a JSON stream contains an integer number, SimdJsonParser will throw a parse exception if it's given a schema where that number is represented as a double. This applies to bare numbers, object values, and array entries:
// All of these throw a parse exceptiondoublerawDouble = newSimdJsonParser().parse("1".getBytes(UTF_8), 1, double.class);
double[] array = newSimdJsonParser().parse("[1, 2]".getBytes(UTF_8), 6, double[].class);
HasDoublebox = newSimdJsonParser().parse("{\"value\": 1}".getBytes(UTF_8), 12, HasDouble.class);
recordHasDouble(doublevalue) {}
As far as I can tell, this is because NumberParser.parseDouble requires double literals to either have a decimal point or exponent part. Should that be the case? I would expect integer number values to be permitted, since they can always be widened to doubles
If a JSON stream contains an integer number,
SimdJsonParserwill throw a parse exception if it's given a schema where that number is represented as a double. This applies to bare numbers, object values, and array entries:As far as I can tell, this is because
NumberParser.parseDoublerequiresdoubleliterals to either have a decimal point or exponent part. Should that be the case? I would expect integer number values to be permitted, since they can always be widened to doubles