The path to the JSON file.
A Promise that resolves to the parsed JSON content of the file.
If the file does not exist or if there is an error reading the file.
const filePath = "path/to/file.json";
readJson(filePath)
.then((jsonContent) => {
console.log(jsonContent);
})
.catch((error) => {
console.error(error);
});
Generated using TypeDoc
Asynchronous function that reads a JSON file from the specified file path.