Use constants for codes instead of a map with string keys
json: Turn on omitEmpty for everything