Function tryParseJson

Parses a JSON string and returns the corresponding object.

  • Type Parameters

    • T = any

    Parameters

    • json: string

      The JSON string to parse.

    • errorValue: {} = {}

      The value to return if parsing fails.

    Returns {}

    The parsed object or the error value.