This commit is contained in:
Taylor Gerring
2015-03-26 16:19:33 +01:00
parent f695d01354
commit 745dd5b7a5
2 changed files with 48 additions and 13 deletions

View File

@ -388,8 +388,12 @@ func (args *Sha3Args) UnmarshalJSON(b []byte) (err error) {
if len(obj) < 1 {
return NewInsufficientParamsError(len(obj), 1)
}
args.Data = obj[0].(string)
argstr, ok := obj[0].(string)
if !ok {
return NewInvalidTypeError("data", "is not a string")
}
args.Data = argstr
return nil
}