Use cleaner interface for json and msgpack codecs