Floats and integers parsing fixes (#638)
* parser: fix scan of float with exp but no decimal * decoder: validate leading zeros for decimals
This commit is contained in:
@@ -149,6 +149,11 @@ func TestUnmarshal_Floats(t *testing.T) {
|
||||
input: `-2E-2`,
|
||||
expected: -2e-2,
|
||||
},
|
||||
{
|
||||
desc: "float exponent zero",
|
||||
input: `0e0`,
|
||||
expected: 0.0,
|
||||
},
|
||||
{
|
||||
desc: "float fractional with exponent",
|
||||
input: `6.626e-34`,
|
||||
|
||||
Reference in New Issue
Block a user