diff --git a/sjson_gae.go b/sjson_gae.go index 4b83a17..eaba00e 100644 --- a/sjson_gae.go +++ b/sjson_gae.go @@ -116,9 +116,9 @@ func SetBytesOptions(json []byte, path string, value interface{}, var err error switch v := value.(type) { default: - b, err := jsongo.Marshal(value) - if err != nil { - return nil, err + b, merr := jsongo.Marshal(value) + if merr != nil { + return nil, merr } // raw := *(*string)(unsafe.Pointer(&b)) raw := string(b) diff --git a/sjson_ngae.go b/sjson_ngae.go index f3624f4..6f47a04 100644 --- a/sjson_ngae.go +++ b/sjson_ngae.go @@ -115,9 +115,9 @@ func SetBytesOptions(json []byte, path string, value interface{}, var err error switch v := value.(type) { default: - b, err := jsongo.Marshal(value) - if err != nil { - return nil, err + b, merr := jsongo.Marshal(value) + if merr != nil { + return nil, merr } raw := *(*string)(unsafe.Pointer(&b)) res, err = set(jstr, path, raw, false, false, optimistic, inplace)