code: def json_dump_hook(cfg, text: bool=False):
      
      data = cfg.config.dump()
  
      if not text:
          json.dump(data, cfg.fd)
      else:
          return json.dumps(data)
docs: Dumps all the data into a JSON file.