cterasdk.convert.serializers module

cterasdk.convert.serializers module#

cterasdk.convert.serializers.CreateElement(parent, tag)#
cterasdk.convert.serializers.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.serializers.toxml(obj)#
cterasdk.convert.serializers.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