so i have some classes
i read about subclassing jsonencoder, but i could do it only for record class, not container
class Record: def __init__(self, a, b, c): # a, b, c are strings self.a = a self.b = b self.c = c class Info: def __init__(self, t, d): # t, d are strings self.t = t self.d = d class Containter: def __init__(self): self.infos = {} # str to Info hash self.storage = {} # str to (str to list of Records) hashfor example, instance of a container:
{"r1": {"c1": [Record("a", "b", "c"), Record("h", "u", "e")], "c2": [Record("t", "b", "r"), Record("q", "o", "m")] }, "r2": {"c3": [Record("c", "j", "m"), Record("h", "u", "e")] } }i tried to use jsonpickle but the output isn't simple to store in file and then deserialize
i read about subclassing jsonencoder, but i could do it only for record class, not container