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.
mikioh
changed the title
json marshal does not obey omitempty for empty structures
encding/json: marshal does not obey omitempty for empty structures
Jan 13, 2015
mikioh
changed the title
encding/json: marshal does not obey omitempty for empty structures
encoding/json: marshal does not obey omitempty for empty structures
Jan 13, 2015
Given this code
https://play.golang.org/p/9Y92Vqf8Bb
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.
{
"stixPackage": {
"version": "1.1.1",
"validTimePosition": {}
}
}
The text was updated successfully, but these errors were encountered: