refactor codec encoding to carry original event in on_event callback
make march_hare output testable
support dynamic key using field reference