# sm.json.save

Write a lua table to json.

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
sm.json.save( root, path )
```

[Open the full Game reference](../Game-Script-Environment/Static-Functions/sm.json.md#save)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `root` | table | The lua table. |
| `path` | string | The json file path. |

## Terrain

``` { .lua .api-signature }
sm.json.save( root, path )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Static-Functions/sm.json.md#save)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `root` | table | The lua table. |
| `path` | string | The json file path. |
