Skip to content
Discussion options

You must be logged in to vote

json and jsonb are automatically unmarshalled. You should use whatever Go type you want the it unmarshalled to, or json.RawMessage is you just want the bytes.

pgtype.JSONB was intentionally removed as it was superfluous.

As far as examples, you could look at json_test.go and jsonb_test.go, but normal usage is pretty straight forward. Scan into your target Go type directly.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sanbei101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants