def default(self, value):
if isinstance(value, datetime):<EOL><INDENT>return value.isoformat()<EOL><DEDENT>elif isinstance(value, date):<EOL><INDENT>dt = datetime(value.year, value.month, value.day, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>return dt.isoformat()<EOL><DEDENT>elif isinstance(value, Decimal):<EOL><INDENT>return float(str(value))<EOL><DEDENT>elif isinstance(value, set):<EOL><INDENT>return list(value)<EOL><DEDENT>return super(ESJsonEncoder, self).default(value)<EOL>
Convert rogue and mysterious data types.
        Conversion notes:

        - ``datetime.date`` and ``datetime.datetime`` objects are
        converted into datetime strings.