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