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

JsonFile.stringify() method

Serializes the specified JSON object to a string buffer.

Signature:

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

Parameters

Parameter Type Description
jsonObject Object the object to be serialized
options IJsonFileStringifyOptions other settings that control serialization

Returns:

string

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