/** * Reads and parses a JSON file. */ export declare function readJson(filepath: string): T; /** * Attempts to read and parse a JSON file, returning null if it fails. */ export declare function tryReadJson(filepath: string): T | null; /** * Writes an object as JSON to a file with a trailing newline. * Uses stringifyObject to properly handle ethers BigNumber serialization. */ export declare function writeJson(filepath: string, obj: unknown): void; /** * Merges an object with existing JSON file content and writes the result. * If the file doesn't exist, writes the object directly. */ export declare function mergeJson>(filepath: string, obj: T): void; /** * Reads JSON from a directory with the specified filename. */ export declare function readJsonFromDir(directory: string, filename: string): T; /** * Writes JSON to a directory with the specified filename. */ export declare function writeJsonToDir(directory: string, filename: string, obj: unknown): void; /** * Merges JSON in a directory with the specified filename. */ export declare function mergeJsonInDir>(directory: string, filename: string, obj: T): void; /** * Write JSON to file, optionally preserving existing values for keys. * If appendMode is true, preserves all existing keys and their values, * only adding new keys from newData that don't exist in the file. */ export declare function writeJsonWithAppendMode(filepath: string, newData: Record, appendMode: boolean): void; //# sourceMappingURL=json.d.ts.map