@tempots/std
parseJSON() function
Parses a JSON string into a JSON value.
Signature:
parseJSON: (value: string) => Result<JSONValue, Error>
Parameters
Parameter |
Type |
Description |
---|---|---|
value |
string |
The JSON string to parse. |
Returns: Result<JSONValue, Error>
A result containing the parsed JSON value or an error if parsing fails.