Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: marshal does not obey omitempty for empty structures #9585
Given this code
you will see that I have not specified in the raw JSON data any data for the validTimePosition, however, when you run the marshal process it shows up, as illustrated below. I would expect that it would not show up at all, if it is empty.