ffjson icon indicating copy to clipboard operation
ffjson copied to clipboard

question about omitempty

Open legendtkl opened this issue 9 years ago • 0 comments

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.

legendtkl avatar May 25 '16 08:05 legendtkl