parameters: (self)
return_statement: return jsonobj
docstring: Saves the info to a JSON file. f is a file object.
docstring_summary: Saves the info to a JSON file. f is a file object.
docstring_tokens: Saves the info to a JSON file . f is a file object .
function: def toJson(self) -> dict:
          """Saves the info to a JSON file. f is a file object."""
          jsonobj = dict()
          REQUIRED = ['name','baseLink']
          OPTIONAL = ['fingerLinks','fingerDrivers','type','center','primaryAxis','secondaryAxis','fingerLength','fingerWidth','fingerDepth',
              'maximumSpan','minimumSpan','closedConfig','openConfig','synergies','gripperLinks','klamptModel']
          for attr in REQUIRED+OPTIONAL:
              jsonobj[attr] = getattr(self,attr)
          for (k,val) in self.synergies.items():
              if callable(val):
                  raise RuntimeError("Can't convert callable synergy to JSON... need to find alternative methods")
          return jsonobj
function_tokens: def toJson ( self ) -> dict : jsonobj = dict ( ) REQUIRED = [ 'name' , 'baseLink' ] OPTIONAL = [ 'fingerLinks' , 'fingerDrivers' , 'type' , 'center' , 'primaryAxis' , 'secondaryAxis' , 'fingerLength' , 'fingerWidth' , 'fingerDepth' , 'maximumSpan' , 'minimumSpan' , 'closedConfig' , 'openConfig' , 'synergies' , 'gripperLinks' , 'klamptModel' ] for attr in REQUIRED + OPTIONAL : jsonobj [ attr ] = getattr ( self , attr ) for ( k , val ) in self . synergies . items ( ) : if callable ( val ) : raise RuntimeError ( "Can't convert callable synergy to JSON... need to find alternative methods" ) return jsonobj