mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
pkg/fixedpoint: support "" on fixedpoint.Value.unmarshalJson
This commit is contained in:
parent
b352ae855f
commit
228bfba525
|
@ -296,7 +296,7 @@ func (v *Value) UnmarshalJSON(data []byte) error {
|
||||||
*v = Zero
|
*v = Zero
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if len(data) == 0 {
|
if len(data) == 0 || bytes.Equal(data, []byte{'"', '"'}) {
|
||||||
*v = Zero
|
*v = Zero
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user