Skip to main content

core.stringify

Home > @medplum/core > stringify

stringify() function

FHIR JSON stringify. Removes properties with empty string values. Removes objects with zero properties. See: https://www.hl7.org/fhir/json.html

Signature:

export declare function stringify(value: any, pretty?: boolean): string;

Parameters

ParameterTypeDescription
valueanyThe input value.
prettyboolean(Optional) Optional flag to pretty-print the JSON.

Returns:

string

The resulting JSON string.