Skip to content

fix flatten for zero values#1

Open
dfuentes wants to merge 2 commits into
doublerebel:masterfrom
segmentio:master
Open

fix flatten for zero values#1
dfuentes wants to merge 2 commits into
doublerebel:masterfrom
segmentio:master

Conversation

@dfuentes
Copy link
Copy Markdown

Hello,

I ran into an issue recently where flattening a struct that included zero values would panic, because calling .Type() on a zero value panics. This change makes it so that zero values are set to null in the flattened representation.

@matthewellis
Copy link
Copy Markdown

@doublerebel Hey i have tested this change and it works correctly, if possible could we get this merged soon as this is causing issues for me when using this with JSON structures that may contain null as a value.

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.

3 participants