def serialize(self) -> str:
    'Serialize data as json string'
    try:
        return json.dumps(self, separators=(',', ':'))
    except json.JSONDecodeError as err:
        return err.msg
Serialize data as json string
def serialize(self) -> str:
    
    try:
        return json.dumps(self, separators=(',', ':'))
    except json.JSONDecodeError as err:
        return err.msg