View Source JSON.LD.Context (JSON-LD.ex v0.3.7)

Implementation of the JSON-LD 1.0 Context Processing Algorithms.

Link to this section Summary

Link to this section Types

@type local() :: map() | String.t() | nil
@type remote() :: [map()]
@type t() :: %JSON.LD.Context{
  api_base_iri: String.t() | nil,
  base_iri: String.t() | boolean() | nil,
  default_language: String.t() | nil,
  term_defs: map(),
  vocab: nil
@type value() :: map() | String.t() | nil

Link to this section Functions

@spec base(t()) :: String.t() | nil
@spec create(map(), JSON.LD.Options.convertible()) :: t()
Link to this function

create_term_definition(active, local, term, value, defined)

View Source
@spec create_term_definition(t(), map(), String.t(), value(), map()) :: {t(), map()}

Expands the given input according to the steps in the JSON-LD Create Term Definition Algorithm.


@spec empty?(t()) :: boolean()
@spec inverse(t()) :: map()

Inverse Context Creation algorithm

Details at

@spec language(t(), String.t()) :: String.t() | nil
Link to this function

new(options \\ %Options{})

View Source
@spec new(JSON.LD.Options.convertible()) :: t()
Link to this function

update(active, local, remote \\ [], options \\ %Options{})

View Source
@spec update(t(), [local()] | local(), remote(), JSON.LD.Options.convertible()) :: t()