core.stringify
Home > @medplum/core > stringify
stringify() function
Returns the FHIR JSON string representation of the input value.
Removes properties with empty string values. Removes objects with zero properties.
Does not modify the input value. If the input value does not contain any empty properties, then the original value is returned. Otherwise, a new value is returned with the empty properties removed.
See: https://www.hl7.org/fhir/json.html
Signature:
export declare function stringify(value: any, pretty?: boolean): string;
Parameters
Parameter | Type | Description |
---|---|---|
value | any | The input value. |
pretty | boolean | (Optional) Optional flag to pretty-print the JSON. |
Returns:
string
The resulting JSON string.