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

Implementation of the JSON-LD 1.0 Context Processing Algorithms.

Summary

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

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.

see https://www.w3.org/TR/json-ld-api/#create-term-definition

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

Inverse Context Creation algorithm

Details at https://www.w3.org/TR/json-ld-api/#inverse-context-creation

@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()