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

Implementation of the JSON-LD 1.0 Compaction Algorithms.

Link to this section Summary

Link to this section Functions

Link to this function

compact(input, context, options \\ %Options{})

View Source
@spec compact(map() | [map()], map() | binary() | nil, JSON.LD.Options.convertible()) ::
  map()
Link to this function

compact_iri(iri, active_context, inverse_context, value \\ nil, vocab \\ false, reverse \\ false)

View Source
@spec compact_iri(
  any(),
  JSON.LD.Context.t(),
  map(),
  any() | nil,
  boolean(),
  boolean()
) :: any() | nil

IRI Compaction

Details at https://www.w3.org/TR/json-ld-api/#iri-compaction

Link to this function

compact_value(value, active_context, inverse_context, active_property)

View Source
@spec compact_value(any(), JSON.LD.Context.t(), map(), String.t()) :: any()

Value Compaction

Details at https://www.w3.org/TR/json-ld-api/#value-compaction

Link to this function

select_term(inverse_context, iri, containers, type_language, preferred_values)

View Source
@spec select_term(map(), String.t(), [String.t()], String.t(), [String.t()]) ::
  String.t()

Term Selection

Details at https://www.w3.org/TR/json-ld-api/#term-selection