---
title: "Discussion on \"Working with Postgres JSONB in Go\" | Hashnode"
description: "Discussion on \"Working with Postgres JSONB in Go\". Background\nSuppose I want to store and read a JSONB/JSON column from Postgres, how do I do it?\nSolution\nMake the data type implements these functions:\n\nScan(src any) error -> Move data from DB to Go struct\nValue() -> Return the JSON encoding that sto..."
url: "https://hashnode.com/posts/working-with-postgres-jsonb-in-go/6399fa5b7fa8d9dc570d6bde"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Working with Postgres JSONB in Go](https://redhoyasa.hashnode.dev/working-with-postgres-jsonb-in-go?utm_source=hashnode&utm_medium=feed)

Background Suppose I want to store and read a JSONB/JSON column from Postgres, how do I do it? Solution Make the data type implements these functions: Scan(src any) error -> Move data from DB to Go struct Value() -> Return the JSON encoding that sto...

Dec 14, 2022 · 1 min read · redhoyasa.hashnode.dev  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[Muhammad Redho Ayassa](https://hashnode.com/@redhoyasa)

@redhoyasa · Jakarta, Indonesia

  
[View profile](https://hashnode.com/@redhoyasa)

Software engineer with 6+ years of experience. Have been spending 5+ years in the fintech &amp; payment products domain. Specialized in backend and have delivered production-grade web app projects as well.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
