code: def tojson(self):
          
          json_str = ctypes.c_char_p()
          check_call(_LIB.MXSymbolSaveToJSON(self.handle, ctypes.byref(json_str)))
          return py_str(json_str.value)
docs: Saves symbol to a JSON string.
  
          See Also
          --------
          symbol.load_json : Used to load symbol from JSON string.