Add @impl annotations
This commit is contained in:
parent
e37d5b1369
commit
874c71123c
2 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,7 @@ defmodule JSON.LD.Decoder do
|
||||||
alias RDF.NS.{XSD}
|
alias RDF.NS.{XSD}
|
||||||
|
|
||||||
|
|
||||||
|
@impl RDF.Serialization.Decoder
|
||||||
def decode(content, opts \\ []) do
|
def decode(content, opts \\ []) do
|
||||||
with {:ok, json_ld_object} <- parse_json(content),
|
with {:ok, json_ld_object} <- parse_json(content),
|
||||||
dataset = to_rdf(json_ld_object, opts) do
|
dataset = to_rdf(json_ld_object, opts) do
|
||||||
|
|
|
@ -13,6 +13,7 @@ defmodule JSON.LD.Encoder do
|
||||||
@rdf_rest to_string(RDF.NS.RDF.rest)
|
@rdf_rest to_string(RDF.NS.RDF.rest)
|
||||||
@rdf_list to_string(RDF.uri(RDF.NS.RDF.List))
|
@rdf_list to_string(RDF.uri(RDF.NS.RDF.List))
|
||||||
|
|
||||||
|
@impl RDF.Serialization.Encoder
|
||||||
def encode(data, opts \\ []) do
|
def encode(data, opts \\ []) do
|
||||||
with {:ok, json_ld_object} <- from_rdf(data, opts) do
|
with {:ok, json_ld_object} <- from_rdf(data, opts) do
|
||||||
encode_json(json_ld_object, opts)
|
encode_json(json_ld_object, opts)
|
||||||
|
|
Loading…
Reference in a new issue