diff --git a/dec_float.go b/dec_float.go index a03d61e..44c2510 100644 --- a/dec_float.go +++ b/dec_float.go @@ -2,7 +2,6 @@ package jx import ( "bytes" - "encoding/json" "io" "math/big" "strconv" @@ -349,12 +348,3 @@ func validateFloat(str []byte) error { } return nil } - -// Number reads json.Number. -func (d *Decoder) Number() (json.Number, error) { - str, err := d.numberAppend(nil) - if err != nil { - return "", err - } - return json.Number(str), nil -} diff --git a/float_test.go b/float_test.go index b1924d7..8451c61 100644 --- a/float_test.go +++ b/float_test.go @@ -33,14 +33,6 @@ func Test_read_big_int(t *testing.T) { should.Equal(`92233720368547758079223372036854775807`, val.String()) } -func Test_read_number(t *testing.T) { - should := require.New(t) - iter := DecodeStr(`92233720368547758079223372036854775807`) - val, err := iter.Number() - should.NoError(err) - should.Equal(`92233720368547758079223372036854775807`, string(val)) -} - func Test_encode_inf(t *testing.T) { should := require.New(t) _, err := json.Marshal(math.Inf(1))