Options
All
  • Public
  • Public/Protected
  • All
Menu

External module chrome/json

JSON utilities

Index

Functions

parse

  • parse<T>(jsonString: string): null | T
  • Parse json, with exception handling

    Type parameters

    • T

    Parameters

    • jsonString: string

      string to parse

    Returns null | T

    json object, null on error

shallowCopy

  • shallowCopy<T>(jsonifiable: T): T
  • Create a shallow copy of an object

    throws

    An error if copy failed

    Type parameters

    • T

    Parameters

    • jsonifiable: T

      object to copy

    Returns T

    shallow copy of input

stringify

  • stringify<T>(jsonifiable: T): null | string
  • Stringify json, with exception handling

    Type parameters

    • T

    Parameters

    • jsonifiable: T

      object to stringify

    Returns null | string

    string, null on error

Generated using TypeDoc