Fix returning number as string for numbers
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
Jan Bader 2022-02-22 13:42:44 +00:00
parent a4ca21bb37
commit 484b1062e1

View File

@ -94,7 +94,7 @@ func (n Numeric) Add(other Numeric) Numeric {
func (n Numeric) MarshalJSON() ([]byte, error) { func (n Numeric) MarshalJSON() ([]byte, error) {
if n.Int.Int64() == 0 { if n.Int.Int64() == 0 {
return []byte("\"0\""), nil return []byte("0"), nil
} }
s := fmt.Sprintf("%d", n.Int) s := fmt.Sprintf("%d", n.Int)