// Scan implements the database/sql Scanner interface. It expects to receive a
// valid JSON string or []byte from an SQL database, and will assign that value
// to j. Scan will not validatet the incoming JSON.
Scan implements the database/sql Scanner interface. It expects to receive a
valid JSON string or []byte from an SQL database, and will assign that value
to j. Scan will not validatet the incoming JSON.
// Scan implements the database / sql Scanner interface . It expects to receive a // valid JSON string or [] byte from an SQL database and will assign that value // to j . Scan will not validatet the incoming JSON .
func (j *RawJSON) Scan(src interface{}) error {
	if j == nil {
		return fmt.Errorf("types.RawJSON: Scan called on nil pointer")
	}
	switch x := src.(type) {
	case []byte:
		j.Set(x)
		return nil
	case string:
		j.SetStr(x)
		return nil
	default:
		return fmt.Errorf("types.RawJSON: cannot scan type %T (%v)", src, src)
	}
}
func ( j * RawJSON ) Scan ( src interface { } ) error { if j == nil { return fmt . Errorf ( " " ) } switch x := src . ( type ) { case [ ] byte : j . Set ( x ) return nil case string : j . SetStr ( x ) return nil default : return fmt . Errorf ( " " , src , src ) } }
Scan implements the database/sql Scanner interface.
Scan implements the database / sql Scanner interface .