Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MarshalJSON methods to *Document / *Array #49

Open
AlekSi opened this issue Sep 26, 2024 · 1 comment · May be fixed by #70
Open

Add MarshalJSON methods to *Document / *Array #49

AlekSi opened this issue Sep 26, 2024 · 1 comment · May be fixed by #70
Assignees
Labels
code/feature Some user-visible feature is not implemented yet community Issues and PRs assigned to community members good first issue Good issues for new external contributors

Comments

@AlekSi
Copy link
Member

AlekSi commented Sep 26, 2024

In some cases, we need JSON representation of Document/Array, not JSON-like like we currently have. For example, extension functions accept BSON or JSON, and logging their parameters in JSON would make it easier to copy and paste them from logs to the psql console.

Let's implement encoding/json.Marshaler on *Document and *Array.
Let's do the basic JSON for now, but document the fact that the exact JSON representation may change. For example, we might use Extended JSON v2 in the future.

@AlekSi AlekSi added the code/feature Some user-visible feature is not implemented yet label Sep 26, 2024
@AlekSi AlekSi changed the title Add MarshalJSON methods Add MarshalJSON methods to *Document / *Array Sep 26, 2024
@AlekSi AlekSi added the good first issue Good issues for new external contributors label Sep 26, 2024
@KrishnaSindhur
Copy link

if no one is working on it, I can pick this up!!

@AlekSi AlekSi added the community Issues and PRs assigned to community members label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/feature Some user-visible feature is not implemented yet community Issues and PRs assigned to community members good first issue Good issues for new external contributors
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants