Home > @rushstack/node-core-library > JsonFile > updateString
JsonFile.updateString() method
Serializes the specified JSON object to a string buffer.
Signature:
static updateString(previousJson: string, newJsonObject: JsonObject, options?: IJsonFileStringifyOptions): string;
Parameters
Parameter | Type | Description |
---|---|---|
previousJson | string | |
newJsonObject | JsonObject | |
options | IJsonFileStringifyOptions | (Optional) other settings that control serialization |
Returns:
string
a JSON string, with newlines, and indented with two spaces