filename or FileHandle
A JavaScript value, usually an object or array, to be converted.
Optionaloptions: Optionalreplacer: Replacer<any>A function that transforms the results.
Optionalspace: string | numberAdds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
Converts a JavaScript value to a JavaScript Object Notation (JSON) string, and asynchronously writes data to a file, replacing the file if it already exists.