pgtype.JSON(B).Value now returns []byte

Allows scanning jsonb column into *json.RawMessage.

fixes #409
non-blocking
Jack Christensen 2018-04-14 09:17:56 -05:00
parent 46d0f7e1c8
commit 9bb19fd8e7
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ func (dst *JSON) Scan(src interface{}) error {
func (src *JSON) Value() (driver.Value, error) {
switch src.Status {
case Present:
return string(src.Bytes), nil
return src.Bytes, nil
case Null:
return nil, nil
default: