Home > @rushstack/node-core-library > JsonFile
JsonFile class
Utilities for reading/writing JSON files.
Signature:
export declare class JsonFile
Methods
Method | Modifiers | Description |
|---|---|---|
| Loads a JSON file. | |
| Loads a JSON file and validate its schema. | |
| An async version of JsonFile.loadAndValidate(). | |
loadAndValidateWithCallback(jsonFilename, jsonSchema, errorCallback, options) |
| Loads a JSON file and validate its schema, reporting errors using a callback |
loadAndValidateWithCallbackAsync(jsonFilename, jsonSchema, errorCallback, options) |
| An async version of JsonFile.loadAndValidateWithCallback(). |
| An async version of JsonFile.load(). | |
| Parses a JSON file's contents. | |
| Saves the file to disk. Returns false if nothing was written due to options.onlyIfChanged. | |
| An async version of JsonFile.save(). | |
| Serializes the specified JSON object to a string buffer. | |
| Serializes the specified JSON object to a string buffer. | |
| Used to validate a data structure before writing. Reports an error if there are any undefined members. |