New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@expo/json-file

Package Overview
Dependencies
Maintainers
28
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/json-file

A module for reading, writing, and manipulating JSON files

9.0.3-canary-20250306-d9d3e02
canary
Source
npm
Version published
Maintainers
28
Created

What is @expo/json-file?

The @expo/json-file npm package is a utility library for reading and writing JSON files. It provides a simple and convenient API for these operations, handling various edge cases and providing helpful error messages.

What are @expo/json-file's main functionalities?

Read JSON file

This feature allows you to read a JSON file asynchronously and parse its contents into a JavaScript object.

{"const { readAsync } = require('@expo/json-file');

async function readJsonFile(filePath) {
  const json = await readAsync(filePath);
  return json;
}

readJsonFile('path/to/file.json').then(data => console.log(data));"}

Write JSON file

This feature enables you to write a JavaScript object to a file as JSON asynchronously, with options to format the output.

{"const { writeAsync } = require('@expo/json-file');

async function writeJsonFile(filePath, data) {
  await writeAsync(filePath, data);
}

const data = { key: 'value' };
writeJsonFile('path/to/file.json', data);"}

Modify JSON file

This feature allows you to modify an existing JSON file by providing an object with the modifications you want to apply.

{"const { modifyAsync } = require('@expo/json-file');

async function modifyJsonFile(filePath, modifications) {
  await modifyAsync(filePath, modifications);
}

modifyJsonFile('path/to/file.json', { key: 'newValue' });"}

Other packages similar to @expo/json-file

Keywords

json

FAQs

Package last updated on 06 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts