Moving non-core parts of json and xml support for wagn to a separate module