Adding omitempty to the JSON metadata of the storage struct fields significantly cuts down the size of the marshaled JSON when a hook is persisting state to a database.
I've left it out on fields that, in my experience, never have the default value; but if you feel it should be consistent on all fields, I can add it to the rest.
Adding
omitempty
to the JSON metadata of thestorage
struct fields significantly cuts down the size of the marshaled JSON when a hook is persisting state to a database.I've left it out on fields that, in my experience, never have the default value; but if you feel it should be consistent on all fields, I can add it to the rest.