> For the complete documentation index, see [llms.txt](https://xeavin.gitbook.io/ff12-lua-loader/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xeavin.gitbook.io/ff12-lua-loader/config/functions/load-json.md).

# Load Json

### Signature

```csharp
table loadJson(string path)
```

### Description

Reads a JSON file from a specific path and deserializes its contents into a table.

Returns a table or `nil` if the file is empty or could not be found.

### Arguments

#### Path

The path of the file to be loaded.

Absolute paths are supported and relative paths start from `{game}\x64\`.

### Example

#### Load Config

```lua
local data = config.loadJson(config.path .. "/mymod-config.json")
```

#### Input

{% code title="mymod-config.json" fullWidth="false" %}

```json
{
    "model": 6488064,
    "name": "Vaan"
}
```

{% endcode %}

### Notes

{% hint style="warning" %}
Only the following value types are supported: `table`, `string`, `double`, `integer`, `bool`.
{% endhint %}

{% hint style="info" %}
Unless a table starts at 1, increases sequentially without gaps, and contains only integer keys, it cannot be reliably traversed in a certain order in Lua.
{% endhint %}
