Unable to scan JSON data into []byte
or json.RawMessage
#284
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
Currently it's not possible to scan the JSON column into
[]byte
orjson.RawMessage
. This means that there's either going to be an additional unnecessary roundtrip due tospanner.NullJSON
.Small example:
Fails with:
Describe the solution you'd like
Support scanning into
json.RawMessage
,[]byte
.It probably would be useful to support scanning directly into
spanner.GenericColumnValue
as well -- letting the user take control over therows.Next
logic.Describe alternatives you've considered
It would be possible the make the query convert the json to a bytes value, which would complicate the queries themselves.
The text was updated successfully, but these errors were encountered: