Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "json"

Index

Functions

Functions

json

  • json<C>(url: IUrlImmutable, data: Json, callback: Convert<C>): C
  • json<V>(url: IUrlImmutable, data: Json, callback?: Verify<V>): V
  • json(url: IUrlImmutable, data: Json): Json
  • Performs the conversion of the JSON

    Type parameters

    • C: any | number | string

    Parameters

    • url: IUrlImmutable

      the URL that was fetched

    • data: Json

      the JSON data that was returned

    • callback: Convert<C>

      the verification or conversion function

    Returns C

    the converted JSON as the correct JavaScript/TypeScript object, number or string

  • Performs the verification of the JSON

    Type parameters

    • V

    Parameters

    • url: IUrlImmutable

      the URL that was fetched

    • data: Json

      the JSON data that was returned

    • Optional callback: Verify<V>

      the verification or conversion function

    Returns V

    the verifed JSON casted to the correct TypeScript interface

  • Forwards the JSON

    Parameters

    • url: IUrlImmutable

      the URL that was fetched

    • data: Json

      the JSON data that was returned

    Returns Json

    the original JSON