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

Link to this section Summary

Link to this section Types

Specs

local() :: map() | String.t() | nil

Specs

remote() :: [map()]

Specs

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
}

Specs

value() :: map() | String.t() | nil

Link to this section Functions

Specs

base(t()) :: String.t() | nil

Specs

create(map(), JSON.LD.Options.t()) :: t()
Link to this function

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

View Source

Specs

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

Specs

empty?(t()) :: boolean()

Specs

inverse(t()) :: map()

Inverse Context Creation algorithm

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

Specs

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

new(options \\ %Options{})

View Source

Specs

new(JSON.LD.Options.t()) :: t()
Link to this function

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

View Source

Specs

update(t(), [local()] | local(), remote(), JSON.LD.Options.t()) :: t()