File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 "bytes"
55 "encoding/json"
66 "errors"
7- "fmt"
87 "reflect"
98)
109
@@ -57,7 +56,7 @@ func (dst *JSON) Set(src interface{}) error {
5756 return nil
5857 }
5958 if ! json .Valid ([]byte (value )) {
60- return fmt . Errorf ("invalid json: %s" , value )
59+ return errors . New ("invalid JSON string value" )
6160 }
6261 * dst = JSON {Bytes : []byte (value ), Status : Present }
6362 case * string :
@@ -69,7 +68,7 @@ func (dst *JSON) Set(src interface{}) error {
6968 return nil
7069 }
7170 if ! json .Valid ([]byte (* value )) {
72- return fmt . Errorf ("invalid json: %s" , * value )
71+ return errors . New ("invalid JSON string pointer value" )
7372 }
7473 * dst = JSON {Bytes : []byte (* value ), Status : Present }
7574 }
@@ -83,7 +82,7 @@ func (dst *JSON) Set(src interface{}) error {
8382 }
8483
8584 if ! json .Valid (value ) {
86- return fmt . Errorf ("invalid json: %s" , value )
85+ return errors . New ("invalid JSON byte array value" )
8786 }
8887 * dst = JSON {Bytes : value , Status : Present }
8988 }
You can’t perform that action at this time.
0 commit comments