diff --git a/encoding/json/number.go b/encoding/json/number.go index 936ba86..04f2969 100644 --- a/encoding/json/number.go +++ b/encoding/json/number.go @@ -12,3 +12,7 @@ func NumberToInt(n json.Number) (int, error) { } return int(n64), nil } + +func NumberToInt64(n json.Number) (int64, error) { + return strconv.ParseInt(n.String(), 10, 64) +}