def default(self, o):
if type(o) in _TYPE_TO_ENCODER:<EOL><INDENT>encoder = _TYPE_TO_ENCODER[type(o)]<EOL>json_struct = encoder(o)<EOL>json_struct[self.TYPE_ID] = type(o).__name__<EOL>return json_struct<EOL><DEDENT>return super(JsonEncoder, self).default(o)<EOL>
Inherit docs.