aboutsummaryrefslogtreecommitdiffstats
path: root/common/hexutil/json.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/hexutil/json.go')
-rw-r--r--common/hexutil/json.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/hexutil/json.go b/common/hexutil/json.go
index cbbadbed6..c36d862b5 100644
--- a/common/hexutil/json.go
+++ b/common/hexutil/json.go
@@ -237,7 +237,7 @@ func checkJSON(input []byte) (raw []byte, err error) {
return nil, errNonString
}
if len(input) == 2 {
- return nil, ErrEmptyString
+ return nil, nil // empty strings are allowed
}
if !bytesHave0xPrefix(input[1:]) {
return nil, ErrMissingPrefix
@@ -255,7 +255,7 @@ func checkNumberJSON(input []byte) (raw []byte, err error) {
}
input = input[1 : len(input)-1]
if len(input) == 0 {
- return nil, ErrEmptyString
+ return nil, nil // empty strings are allowed
}
if !bytesHave0xPrefix(input) {
return nil, ErrMissingPrefix