ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.87k stars 295 forks source link

"omitempty" fails on pointers to bools #67

Closed teepark closed 9 years ago

teepark commented 9 years ago

A struct field of type bool which points to false is triggering the "omitempty" behavior even though it's not a nil pointer. This is not the zero value of the bool type, so it shouldn't cause the field to be omitted (this is a trick to get "false" to show up in output, but still be able to leave the field out entirely).

ugorji commented 9 years ago

Please add a reproducer that I can run and test with.

ugorji commented 9 years ago

Fixed