parameters: (self)
return_statement: return json.dumps(obj, sort_keys=True, ensure_ascii=True, indent=None)
docstring: Returns (str): The JSON representation of the StreamParams.
  
      Converts stream parameters to JSON for Butler consumption.
  
      Raises:
        ValueError: if these parameters are not valid.
docstring_summary: Returns (str): The JSON representation of the StreamParams.
docstring_tokens: Returns ( str ) : The JSON representation of the StreamParams .
function: def to_json(self):
          """Returns (str): The JSON representation of the StreamParams.
  
      Converts stream parameters to JSON for Butler consumption.
  
      Raises:
        ValueError: if these parameters are not valid.
      """
          self.validate()
  
          obj = {
              'name': self.name,
              'type': self.type,
          }
  
          def _maybe_add(key, value):
              if value is not None:
                  obj[key] = value
  
          _maybe_add('contentType', self.content_type)
          _maybe_add('tags', self.tags)
  
          # Note that "dumps' will dump UTF-8 by default, which is what Butler wants.
          return json.dumps(obj, sort_keys=True, ensure_ascii=True, indent=None)
function_tokens: def to_json ( self ) : self . validate ( ) obj = { 'name' : self . name , 'type' : self . type , } def _maybe_add ( key , value ) : if value is not None : obj [ key ] = value _maybe_add ( 'contentType' , self . content_type ) _maybe_add ( 'tags' , self . tags ) # Note that "dumps' will dump UTF-8 by default, which is what Butler wants. return json . dumps ( obj , sort_keys = True , ensure_ascii = True , indent = None )