nat.observability.mixin.serialize_mixin#

Classes#

Module Contents#

class SerializeMixin#
_process_streaming_output(input_value: Any) Any#

Serialize a list of values to a JSON string.

_serialize_payload(input_value: Any) tuple[str, bool]#

Serialize the input value to a string. Returns a tuple with the serialized value and a boolean indicating if the serialization is JSON or a string.

Args:

input_value (Any): The input value to serialize.

Returns:
tuple[str, bool]: A tuple with the serialized value and a boolean indicating if the serialization is

JSON or a string.