SerializerBase: rework to use HashMaps with constant lookup,  rather than if..else chains