minigame-std
Version:
Mini Game Standard Development Library.
34 lines (20 loc) • 637 B
Markdown
[**minigame-std**](../../../README.md)
***
[minigame-std](../../../README.md) / [fs](../README.md) / readJsonFile
# Function: readJsonFile()
```ts
function readJsonFile<T>(filePath): AsyncIOResult<T>
```
Defined in: [src/std/fs/fs\_async.ts:205](https://github.com/JiangJie/minigame-std/blob/fdb22241c47c2e98329a4c62befde728957e03ee/src/std/fs/fs_async.ts#L205)
读取文件并解析为 JSON。
## Type Parameters
| Type Parameter |
| ------ |
| `T` |
## Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `filePath` | `string` | 文件路径。 |
## Returns
`AsyncIOResult`\<`T`\>
读取结果。