def json_serial(obj):
    """
    JSON serializer for objects not serializable by default json code
    Sources: [https://stackoverflow.com/a/22238613,
    https://stackoverflow.com/a/41200652,
    https://github.com/chartmogul/chartmogul-python/blob/master/chartmogul/resource.py]
    """
    from datetime import datetime, time
    if isinstance(obj, (datetime, time)):
        serial = obj.isoformat()
        return serial
    else:
        return 'Non-Serializable Data'
