# ee.String.serialize

<br />

Returns the serialized representation of this object.

<br />

| Usage | Returns |
|---|---|
| `String.serialize(*legacy*)` | String |

| Argument | Type | Details |
|---|---|---|
| this: `computedobject` | ComputedObject | The ComputedObject instance. |
| `legacy` | Boolean, optional | Enables legacy format. |

## Examples

### Code Editor (JavaScript)

```javascript
print('Serialized representation of ee.String', ee.String('earth').serialize());
```
Python setup

See the [Python Environment](https://developers.google.com/earth-engine/guides/python_install) page for information on the Python API and using
`geemap` for interactive development.

```python
import ee
import geemap.core as geemap
```

### Colab (Python)

```python
display('Serialized representation of ee.String:', ee.String('earth').serialize())
```