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

Fix types.JSON.MarshalJSON to handle nil values #1318

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

agis
Copy link
Contributor

@agis agis commented Oct 17, 2023

This patch adds support for properly marshalling a nil types.JSON value into null, mimicking the implementation of stdlib's encoding/json[1].

Fixes #1255 (comment)

[1] https://cs.opensource.google/go/go/+/master:src/encoding/json/encode.go;l=805-807

This patch adds support for properly marshalling a nil types.JSON value
into `null`, mimicking the implementation of encoding/json[1].

Fixes volatiletech#1255 (comment)

[1] https://cs.opensource.google/go/go/+/master:src/encoding/json/encode.go;l=805-807
@stephenafamo stephenafamo merged commit 63485f5 into volatiletech:master Oct 18, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

type.JSON errors, but same data (column) switching to null.JSON works on json.Marshal of table struct
2 participants