Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/node-core-library > JsonFile > stringify

JsonFile.stringify() method

Serializes the specified JSON object to a string buffer.

Signature:

static stringify(jsonObject: JsonObject, options?: IJsonFileStringifyOptions): string;

Parameters

ParameterTypeDescription
jsonObjectJsonObjectthe object to be serialized
optionsIJsonFileStringifyOptions(Optional) other settings that control serialization

Returns:

string

a JSON string, with newlines, and indented with two spaces