ffjson
ffjson copied to clipboard
question about omitempty
Now in a scene, We will only output the assigned fields (that will be given). The tag omitempty will ignore the fields if it is not set (that fields will be set to default value, like 0, "").
The problem is sometime I will set the value to zero, and I still want to output it. omitempty does not work for this case. Is there any alternative solution ?
Thanks.