Skip to content

Commit ea603b8

Browse files
committed
Define the format URI to http://www.w3.org/ns/formats/JSON-LD.
1 parent 8b636d6 commit ea603b8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/json/ld/format.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ module JSON::LD
2323
class Format < RDF::Format
2424
content_type 'application/ld+json',
2525
extension: :jsonld,
26-
alias: 'application/x-ld+json'
26+
alias: 'application/x-ld+json',
27+
uri: 'http://www.w3.org/ns/formats/JSON-LD'
2728
content_encoding 'utf-8'
2829

2930
reader { JSON::LD::Reader }

spec/format_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
specify {expect(described_class.to_sym).to eq :jsonld}
4242
end
4343

44+
describe "#to_uri" do
45+
specify {expect(described_class.to_uri).to eq RDF::URI('http://www.w3.org/ns/formats/JSON-LD')}
46+
end
47+
4448
describe ".detect" do
4549
{
4650
jsonld: '{"@context" => "foo"}',

0 commit comments

Comments
 (0)