def date_default(obj):
if isinstance(obj, datetime):<EOL><INDENT>return obj.strftime(ISO8601)<EOL><DEDENT>else:<EOL><INDENT>raise TypeError("<STR_LIT>"%obj)<EOL><DEDENT>
default function for packing datetime objects in JSON.