Open gouyelliot opened 3 years ago
Sorry for the late follow-up here, I've been working on a solution to this as we definitely have bugs internally when it comes to the handling of embedded pointers specifically.
If you need a workaround right now, embedding the same struct without a pointer works as expected. I'll continue working on a proper solution to this problem in the meantime.
Hello,
I recently tried using your library in one of our software, and I'd like to report an issue that we have when doing so.
The output when calling Marshal on
encoding/json
andsegmentio/encoding/json
differs.I was able to reproduce the error using the following code:
Note that when removing the
omitempty
tag fromMyStruct.MyField
, the output is correct.Segmentio Encoding Version: 0.2.7 Golang Version: 1.15.7 OS: macOS Catalina 10.15.7