Skip to content

Latest commit

 

History

History
122 lines (58 loc) · 2.4 KB

File metadata and controls

122 lines (58 loc) · 2.4 KB
hide_title true
custom_edit_url
pagination_prev
pagination_next

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

IJsonFileStringifyOptions interface

Options for JsonFile.stringify()

Signature:

export interface IJsonFileStringifyOptions extends IJsonFileParseOptions 

Extends: IJsonFileParseOptions

Properties

Property

Modifiers

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) By default, JsonFile.stringify() validates that the object does not contain any keys whose value is undefined<></>. To disable this validation, set IJsonFileStringifyOptions.ignoreUndefinedValues to true which causes such keys to be silently discarded, consistent with the system JSON.stringify()<></>.

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.