cterasdk.convert.format module

cterasdk.convert.format module#

cterasdk.convert.format.CreateElement(parent, tag)#
cterasdk.convert.format.tojsonstr(obj, pretty_print=True, no_log=True)#

Convert a Python object to a JSON string.

Parameters:
  • obj (object) – the Python object

  • pretty_print (bool) – Whether to format the JSON string, defaults to True

  • no_log (book) – Hide sensitive values in the log messages

Returns:

JSON string of the object

Return type:

str

cterasdk.convert.format.toxml(obj)#
cterasdk.convert.format.toxmlstr(obj, pretty_print=False)#

Convert a Python object to an XML string

Parameters:
  • obj (object) – the Python object

  • pretty_print (bool) – whether to format the XML string, defaults to False

Returns:

XML string of the object

Return type:

str