toJson
Converts a given value to a JSON string.
Import:
import { toJson } from 'obsidian-dev-utils/object-utils';Signature:
function toJson(value: unknown, options: Partial<ToJsonOptions>): stringParameters:
| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to be converted to JSON. This can be of any type. |
options | Partial<ToJsonOptions> | Options for customizing the JSON conversion process. |
Returns: string — The JSON string representation of the input value.
Links to this page: