From 9bb19fd8e7120f92356a0db47dc72f03b46a11eb Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Sat, 14 Apr 2018 09:17:56 -0500 Subject: [PATCH] pgtype.JSON(B).Value now returns []byte Allows scanning jsonb column into *json.RawMessage. fixes #409 --- json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json.go b/json.go index ef8231b1..b05aba6b 100644 --- a/json.go +++ b/json.go @@ -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: