> ## 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.

# data_tree_to_json class

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

## Summary

Writes a json file or string from a DataTree

available inputs: `data_tree` (DataTree), `path` (string) (optional)

available outputs: `data_sources` (DataSources ,string)

## Example

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

op = data_tree_to_json(data_tree=my_data_tree,path=my_path)
```

## Class Information

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

## Inputs

### data\_tree

**Type:** *LinkableInput*

### path

**Type:** *LinkableInput*

## Outputs

### data\_sources

**Type:** *LinkableOutput*

## Constructors

#### Constructor

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

#### Constructor

```python theme={null}
data_tree_to_json(data_tree, path, config)
```

**Parameters:**

* `data_tree` (*object*)
* `path` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
data_tree_to_json(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
```
