pkg/fixedpoint: support "" on fixedpoint.Value.unmarshalJson

This commit is contained in:
Edwin 2024-01-11 16:42:06 +08:00
parent b352ae855f
commit 228bfba525

View File

@ -296,7 +296,7 @@ func (v *Value) UnmarshalJSON(data []byte) error {
*v = Zero
return nil
}
if len(data) == 0 {
if len(data) == 0 || bytes.Equal(data, []byte{'"', '"'}) {
*v = Zero
return nil
}