(o)
From https://stackoverflow.com/questions/11942364/typeerror-integer-is-not-json-serializable-when-serializing-json-in-python
From https://stackoverflow.com/questions/11942364/typeerror-integer-is-not-json-serializable-when-serializing-json-in-python
From https : // stackoverflow . com / questions / 11942364 / typeerror - integer - is - not - json - serializable - when - serializing - json - in - python
def json_default_type_checker(o):
    """
    From https://stackoverflow.com/questions/11942364/typeerror-integer-is-not-json-serializable-when-serializing-json-in-python
    """
    if isinstance(o, int64): return int(o)
    raise TypeError
def json_default_type_checker ( o ) : if isinstance ( o , int64 ) : return int ( o ) raise TypeError