Encoder base class for Pump::Xml & Pump::Json