parameters: (self, value)
docstring: Encodes value of any supported type.
docstring_summary: Encodes value of any supported type.
docstring_tokens: Encodes value of any supported type .
function: def Add(self, value):
      """Encodes value of any supported type."""
      if value is None:
        self.Null()
      elif isinstance(value, bool):
        self.Bool(value)
      elif isinstance(value, int):
        self.Int(value)
      elif isinstance(value, float):
        self.Float(value)
      elif isinstance(value, str):
        self.String(value)
      elif isinstance(value, (bytes, bytearray)):
        self.Blob(value)
      elif isinstance(value, dict):
        with self.Map():
          for k, v in value.items():
            self.Key(k)
            self.Add(v)
      elif isinstance(value, array.array):
        self.TypedVectorFromElements(value)
      elif _IsIterable(value):
        self.VectorFromElements(value)
      else:
        raise TypeError('unsupported python type: %s' % type(value))
function_tokens: def Add ( self , value ) : if value is None : self . Null ( ) elif isinstance ( value , bool ) : self . Bool ( value ) elif isinstance ( value , int ) : self . Int ( value ) elif isinstance ( value , float ) : self . Float ( value ) elif isinstance ( value , str ) : self . String ( value ) elif isinstance ( value , ( bytes , bytearray ) ) : self . Blob ( value ) elif isinstance ( value , dict ) : with self . Map ( ) : for k , v in value . items ( ) : self . Key ( k ) self . Add ( v ) elif isinstance ( value , array . array ) : self . TypedVectorFromElements ( value ) elif _IsIterable ( value ) : self . VectorFromElements ( value ) else : raise TypeError ( 'unsupported python type: %s' % type ( value ) )