The expected return type after parsing.
The JSON string to parse.
The fallback value to return if parsing fails.
Optionaloptions: {Optional settings to customize parsing behavior.
Optionalcallback?: (error: unknown) => voidOptional callback invoked when parsing fails. Receives the error object.
OptionallogError?: booleanIf true, logs the error and input string to the console.
Optionalreviver?: (this: any, key: string, value: any) => anyOptional reviver function passed to JSON.parse.
The parsed object if successful, otherwise the fallback value.
Safely parses a JSON string, returning a fallback value if parsing fails.