I have the following string
{\"action\":\"print\",\"method\":\"onData\",\"data\":\"Madan Mohan\"}
I Want to deserialize to a object of cla
>>> j = '{"action": "print", "method": "onData", "data": "Madan Mohan"}' >>> import json >>> >>> class Payload(object): ... def __init__(self, j): ... self.__dict__ = json.loads(j) ... >>> p = Payload(j) >>> >>> p.action 'print' >>> p.method 'onData' >>> p.data 'Madan Mohan'