from datetime import datetime


def json_utils_default(obj):
    """ defaults function used by json.dumps function to make datetime values javascript compatible

    """
    if isinstance(obj, datetime):
        return obj.isoformat()
    return obj