Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "object/safely-parse-json"

Index

Functions

Functions

safelyParseJSON

  • safelyParseJSON(json: string): Json | Error
  • Safely parses a json string and returns the result, or an Error, instead of throwing an Error. Also wraps the type.

    Parameters

    • json: string

      The json still in string format.

    Returns Json | Error

    The parsed JSON, or an Error object if the JSON was malformed.

Generated using TypeDoc