Home > @rushstack/node-core-library > IJsonFileStringifyOptions

IJsonFileStringifyOptions interface

Options for JsonFile.stringify()

Signature:

export interface IJsonFileStringifyOptions 

Properties

Property Type Description
headerComment? string (Optional) If specified, this header will be prepended to the start of the file. The header must consist of lines prefixed by “//” characters.
ignoreUndefinedValues? boolean (Optional) If true, conforms to the standard behavior of JSON.stringify() when a property has the value undefined. Specifically, the key will be dropped from the emitted object.
newlineConversion? NewlineKind (Optional) If provided, the specified newline type will be used instead of the default \r\n.
prettyFormatting? boolean (Optional) If true, then the “jju” library will be used to improve the text formatting. Note that this is slightly slower than the native JSON.stringify() implementation.