# 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

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







# Categories

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

# See Also

[ObjectEquals()](objectequals.md), [ObjectLoad()](objectload.md)