> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# serializer_to_string class

**Namespace:** [Ans.DataProcessing.operators.serialization](https://developer.synopsys.com/docs/dpf/dpf-mechanical/api/Ans.DataProcessing/operators/serialization)

## Summary

Take any input and serialize them in a string.

available inputs: `stream_type` (Int32), `any_input1` (object), `any_input2` (object)

available outputs: `nof_chunks` (Int32), `serialized_string1` (string), `serialized_string2` (string)

## Example

```python theme={null}
op = serializer_to_string()

op = serializer_to_string(stream_type=my_stream_type,any_input1=my_any_input1,any_input2=my_any_input2)
```

## Class Information

| Property | Value |
| - | - |
| Namespace | `Ans.DataProcessing.operators.serialization` |
| Assembly | `Ans_Dpf_Native_dll_cs` |
| Base Class | `Ans.DataProcessing.internal_objects.BaseOperator` |

## Inputs

### stream\_type

0 for string (default), 1 for binary, 2 for binary with chunked output (the output string will be returned in several chunks to prevent string memory overflows).

**Type:** *LinkableInput*

### any\_input1

any input

**Type:** *LinkableInput*

### any\_input2

any input

**Type:** *LinkableInput*

## Outputs

### nof\_chunks

Number of chunks when mode passed to input pin(-1) = 2.

**Type:** *LinkableOutput*

### serialized\_string1

**Type:** *LinkableOutput*

### serialized\_string2

**Type:** *LinkableOutput*

## Constructors

#### Constructor

```python theme={null}
serializer_to_string()
```

#### Constructor

```python theme={null}
serializer_to_string(stream_type, any_input1, any_input2, config)
```

**Parameters:**

* `stream_type` (*object*)
* `any_input1` (*object*)
* `any_input2` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
serializer_to_string(config)
```

**Parameters:**

* `config` (*OperatorConfig*)

## Methods

## Properties

#### inputs

**Type:** *InputSpec*

```python theme={null}
# Get or set the property
value = obj.inputs
obj.inputs = new_value
```

#### outputs

**Type:** *OutputSpec*

```python theme={null}
# Get or set the property
value = obj.outputs
obj.outputs = new_value
```

#### defaultConfig

**Type:** *Config*

```python theme={null}
# Get the property (read-only)
value = obj.defaultConfig
```
