Function isJson

  • Checks if a string is a valid JSON by attempting to parse it.

    Parameters

    • value: string | object

    Returns boolean | Record<string, unknown>

    Returns the parsed JSON object if the string is valid JSON, otherwise returns false.

Generated using TypeDoc