Add ability to provide encoder that will dump/load values.

The use case is Marshal, JSON, Msgpack, etc.