JSON.LD.Options (JSON-LD.ex v1.0.0)
View SourceOptions accepted by the JSON-LD processing algorithms.
as specified at https://www.w3.org/TR/json-ld11-api/#the-jsonldoptions-type
Additional options
Besides the standard JSON-LD options described in the specification, this implementation provides the following additional options:
:lowercase_language
- When set totrue
(default), language tags are automatically converted to lowercase during processing.:warn
- Configures how warnings are handled during processing. Possible values::default
- Uses the value from the application config (defaults to:log
):ignore
- Silently ignores warnings:raise
- Raises an exception on warnings:log
- Logs warnings using Loggertrue
- Same as:default
false
- Same as:ignore
- A function accepting a message string
The default warning behavior can be configured in your application config:
config :json_ld, warn: :log # or any other valid warning option, except :default
Limitations
The :produce_generalized_rdf
option is currently not supported due to lack of Generalized RDF
support in RDF.ex.
Summary
Types
@type t() :: %JSON.LD.Options{ base: String.t() | nil, compact_arrays: boolean(), compact_to_relative: boolean(), document_loader: nil, expand_context: map() | String.t() | nil, extract_all_scripts: boolean(), frame_expansion: boolean(), lowercase_language: boolean(), ordered: boolean(), processing_mode: String.t(), produce_generalized_rdf: boolean(), profile: String.t() | nil, rdf_direction: String.t() | nil, request_profile: String.t() | [String.t()] | nil, use_native_types: boolean(), use_rdf_type: boolean(), warn: warn_method() }