# ObjectSave()

serialize a (Serializable) object to a binary representation of the object

```
ObjectSave( input=any, filepath=string );
```

**Returns:** any

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| input | any | Yes | object to serialize *Alias: object* |  |
| filepath | string | No | path where lucee should save the object |  |

# Examples

```1
my_items = { id = 1, name = "item" };
new_object = ObjectSave(input = my_items);
dump(new_object);
```







# Categories

[Objects](../../categories/object.md)

# See Also

[Diagnosing struct iteration-order regressions on 7.1 with `lucee.concurrent.map.impl=legacy`](../../recipes/concurrent-map-legacy-flag.md), [ObjectEquals()](objectequals.md), [ObjectLoad()](objectload.md)