jsonld-ex/lib/json/ld/options.ex
2017-05-20 16:35:56 +02:00

22 lines
622 B
Elixir

defmodule JSON.LD.Options do
@moduledoc """
Options accepted by the JSON-LD processing algorithms.
as specified at <https://www.w3.org/TR/json-ld-api/#the-jsonldoptions-type>
"""
defstruct base: nil,
compact_arrays: true,
document_loader: nil,
expand_context: nil,
produce_generalized_rdf: false,
use_rdf_type: false,
use_native_types: false,
processing_mode: "json-ld-1.0"
def new(), do: %JSON.LD.Options{}
def new(%JSON.LD.Options{} = options), do: options
def new(options), do: struct(JSON.LD.Options, options)
end