code: def from_json(cls, json_dump):
          
          context = cls()
          if json_dump is None:
              return None
          ctxt = json.loads(json_dump)
          for k in ctxt:
              context[k] = ctxt[k]
          return context
docs: How to get a context from a json dump