in pulsar/schema/definition.py [0:0]
def validate_type(self, name, val):
if val is None:
return None
super(Map, self).validate_type(name, val)
for k, v in val.items():
if type(k) != str and not is_unicode(k):
raise TypeError('Map keys for field ' + name + ' should all be strings')
if not isinstance(v, self.value_type.python_type()):
raise TypeError('Map values for field ' + name + ' should all be of type '
+ _string_representation(self.value_type.python_type()))
return val