Gets a serializer for a particular type. For primitives, returns the
        serializer from the module-level serializers.
        For arrays and objects, uses the special _get_T_serializer methods to
        build the encoders and decoders.

def _get_serializer(self, _type):
        """Gets a serializer for a particular type. For primitives, returns the
        serializer from the module-level serializers.
        For arrays and objects, uses the special _get_T_serializer methods to
        build the encoders and decoders.
        """
        if _type in _serializers:  # _serializers is module level
            return _serializers[_type]
        # array and object are special types
        elif _type == 'array':
            return self._get_array_serializer()
        elif _type == 'object':
            return self._get_object_serializer()

        raise ValueError('Unknown type: {}'.format(_type))