Fix warnings
This commit is contained in:
parent
c76e9a1f39
commit
9e9330a08b
|
@ -305,7 +305,7 @@ defmodule JSON.LD.Context do
|
|||
|
||||
# 16.1)
|
||||
defp do_create_container_definition(_, %{"@container" => container})
|
||||
when not container in ~w[@list @set @index @language],
|
||||
when container not in ~w[@list @set @index @language],
|
||||
do: raise JSON.LD.InvalidContainerMappingError,
|
||||
message: "#{inspect container} is not a valid container mapping; @container must be either @list, @set, @index, or @language"
|
||||
# 16.2)
|
||||
|
|
|
@ -319,11 +319,11 @@ defmodule JSON.LD.Encoder do
|
|||
end
|
||||
|
||||
|
||||
defp encode_json(value, opts \\ []) do
|
||||
defp encode_json(value, opts) do
|
||||
Jason.encode(value, opts)
|
||||
end
|
||||
|
||||
defp encode_json!(value, opts \\ []) do
|
||||
defp encode_json!(value, opts) do
|
||||
Jason.encode!(value, opts)
|
||||
end
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ defmodule JSON.LD.Expansion do
|
|||
# 8)
|
||||
%{"@value" => value} ->
|
||||
with keys = Map.keys(result) do # 8.1)
|
||||
if Enum.any?(keys, &(not &1 in ~w[@value @language @type @index])) ||
|
||||
if Enum.any?(keys, &(&1 not in ~w[@value @language @type @index])) ||
|
||||
("@language" in keys and "@type" in keys) do
|
||||
raise JSON.LD.InvalidValueObjectError,
|
||||
message: "value object with disallowed members"
|
||||
|
|
Loading…
Reference in a new issue