Back to Expo

README

packages/@expo/json-file/README.md

latest532 B
Original Source
<!-- Title --> <h1 align="center"> šŸ‘‹ Welcome to <code>@expo/json-file</code> </h1> <p align="center">A library for reading and writing JSON files.</p> <!-- Body -->

šŸ Setup

Install @expo/json-file in your project.

sh
yarn add @expo/json-file

āš½ļø Usage

ts
import JsonFile, { JSONObject } from '@expo/json-file';

// Create a file instance
const jsonFile = new JsonFile<JSONObject>(filePath);

// Interact with the file
await jsonFile.readAsync();
await jsonFile.writeAsync({ some: 'data' });