We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6714afb commit cf057cdCopy full SHA for cf057cd
core/src/main/java/com/alibaba/fastjson2/JSONReader.java
@@ -3099,7 +3099,7 @@ public final Number getNumber() {
3099
return Double.parseDouble(
3100
decimalStr + "E" + exponent);
3101
}
3102
- return new BigDecimal(decimalStr + "E" + exponent);
+ return decimal.signum() == 0 ? BigDecimal.ZERO : new BigDecimal(decimalStr + "E" + exponent);
3103
3104
3105
if ((context.features & Feature.UseDoubleForDecimals.mask) != 0) {
0 commit comments