(self, obj: utils.json_value_t)
Returns ``obj`` serialized as JSON formatted bytes
		
		Raises
		------
		~ipfshttpclient.exceptions.EncodingError
		
		Parameters
		----------
		obj
			JSON serializable Python object
Returns ``obj`` serialized as JSON formatted bytes
		
		Raises
		------
		~ipfshttpclient.exceptions.EncodingError
		
		Parameters
		----------
		obj
			JSON serializable Python object
Returns obj serialized as JSON formatted bytes Raises ------ ~ipfshttpclient . exceptions . EncodingError Parameters ---------- obj JSON serializable Python object
def encode(self, obj: utils.json_value_t) -> bytes:
		"""Returns ``obj`` serialized as JSON formatted bytes
		
		Raises
		------
		~ipfshttpclient.exceptions.EncodingError
		
		Parameters
		----------
		obj
			JSON serializable Python object
		"""
		try:
			result = json.dumps(obj, sort_keys=True, indent=None,
			                    separators=(',', ':'), ensure_ascii=False)
			return result.encode("utf-8")
		except (UnicodeEncodeError, TypeError) as error:
			raise exceptions.EncodingError('json', error) from error
def encode ( self , obj : utils . json_value_t ) -> bytes : try : result = json . dumps ( obj , sort_keys = True , indent = None , separators = ( ',' , ':' ) , ensure_ascii = False ) return result . encode ( "utf-8" ) except ( UnicodeEncodeError , TypeError ) as error : raise exceptions . EncodingError ( 'json' , error ) from error