Skip to main content
Home
This release is 27 versions behind 1.5.1 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
94%
Published
4 months ago (1.3.3)
method Collection.fromJsonLd
Collection.fromJsonLd(
json: unknown,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; },
): Promise<Collection>

Converts a JSON-LD structure to an object of this type.

Parameters

json: unknown

The JSON-LD structure to convert.

optional
options: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; tracerProvider?: TracerProvider; }

The options to use.

  • documentLoader: The loader for remote JSON-LD documents.
  • contextLoader: The loader for remote JSON-LD contexts.
  • tracerProvider: The OpenTelemetry tracer provider to use. If omitted, the global tracer provider is used.

Return Type

The object of this type.

Throws

TypeError

If the given json is invalid.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { Collection } from "@fedify/fedify/vocab";
or

Import directly with a jsr specifier

import { Collection } from "jsr:@fedify/fedify/vocab";

Add Package

pnpm i jsr:@fedify/fedify
or (using pnpm 10.8 or older)
pnpm dlx jsr add @fedify/fedify

Import symbol

import { Collection } from "@fedify/fedify/vocab";

Add Package

yarn add jsr:@fedify/fedify
or (using Yarn 4.8 or older)
yarn dlx jsr add @fedify/fedify

Import symbol

import { Collection } from "@fedify/fedify/vocab";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { Collection } from "@fedify/fedify/vocab";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { Collection } from "@fedify/fedify/vocab";