/** * Converts a JavaScript Object Notation (JSON) string into an object. * * @tsplus static Either.Ops parseJSON */ export function parseJSON( s: string, onError: (reason: unknown) => E ): Either { return Either.tryCatch(() => JSON.parse(s), onError) }