Skip to content

Define JSON literal and the rdf:JSON datatype. #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,26 @@ jobs:
name: "Verify examples are consistent"
language: ruby
rvm: 2.5
before_install:
- 'gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)'
- 'gem update bundler --conservative'
bundler_args: --without debug
script: "rake test"
- stage: links
name: "Check internal links and HTML"
language: ruby
sudo: required
services:
- docker
# Because (alas) rawgit is end of life, we'll run this only on the master branch.
if: branch = master
language: ruby
rvm: 2.5
before_install:
- 'gem update --system --conservative || (gem i "rubygems-update:~>2.7" --no-document && update_rubygems)'
- 'gem update bundler --conservative'
script:
- docker pull stupchiy/checklink
- docker run -it stupchiy/checklink -b -X '(http|https|mailto):' "https://labs.w3.org/spec-generator/?type=respec&url=https://w3c.github.io/json-ld-syntax/index.html?specStatus=WD;shortName=json-ld11"
- docker run -it stupchiy/checklink -b -X '(http|https|mailto):' "https://labs.w3.org/spec-generator/?type=respec&url=https://rawgit.com/w3c/json-ld-api/${TRAVIS_BRANCH}/index.html?specStatus=WD;shortName=json-ld11-api"
- bundle exec rake check_html
- stage: echidna
name: "Echidna Publication"
Expand Down
16 changes: 9 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
GIT
remote: git://github.com/ruby-rdf/json-ld.git
revision: 147930bfd2bceeef4d6f79f203cddc4134e3b65d
revision: 32935901cd7390b256c6904c096645681db3668f
branch: develop
specs:
json-ld (3.0.2)
json-canonicalization (~> 0.1)
link_header (~> 0.0, >= 0.0.8)
multi_json (~> 1.13)
rack (>= 1.6, < 3.0)
Expand All @@ -18,7 +19,7 @@ GEM
i18n
builder (3.2.3)
colorize (0.8.1)
concurrent-ruby (1.1.4)
concurrent-ruby (1.1.5)
connection_pool (2.2.2)
ebnf (1.1.3)
rdf (~> 3.0)
Expand All @@ -31,8 +32,9 @@ GEM
hamster (3.0.0)
concurrent-ruby (~> 1.0)
htmlentities (4.3.4)
i18n (1.5.3)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
json-canonicalization (0.1.0)
json-ld-preloaded (3.0.2)
json-ld (~> 3.0)
multi_json (~> 1.12)
Expand Down Expand Up @@ -73,7 +75,7 @@ GEM
multi_json (1.13.1)
net-http-persistent (3.0.0)
connection_pool (~> 2.2)
nokogiri (1.10.1)
nokogiri (1.10.2)
mini_portile2 (~> 2.4.0)
nokogumbo (1.5.0)
nokogiri
Expand Down Expand Up @@ -152,9 +154,9 @@ GEM
sparql-client (3.0.1)
net-http-persistent (>= 2.9, < 4)
rdf (~> 3.0)
sxp (1.0.1)
rdf (>= 2.2, < 4.0)
temple (0.8.0)
sxp (1.0.2)
rdf (~> 3.0)
temple (0.8.1)
tilt (2.0.9)

PLATFORMS
Expand Down
5 changes: 5 additions & 0 deletions common/extract-examples.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
require 'yaml'
require 'cgi'

# FIXME: This is here until the rdf:JSON is added in RDF.rb
unless RDF::RDFV.properties.include?( RDF.to_uri + 'JSON')
RDF::RDFV.property :JSON, label: "JSON", comment: "JSON datatype"
end

PREFIXES = {
dc: "http://purl.org/dc/terms/",
cred: "https://w3id.org/credentials#",
Expand Down
8 changes: 8 additions & 0 deletions common/jsonld.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ const jsonld = {
authors: ['Domenic Denicola'],
status: 'unofficial',
date: 'January 2014'
},
"JCS": {
title: "JSON Canonicalization Scheme (JCS)",
href: 'https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05',
authors: ['A. Rundgren', 'B. Jordan', 'S. Erdtman'],
publisher: 'Network Working Group',
status: 'Internet-Draft',
date: 'February 16, 2019'
}
},
conversions: {
Expand Down
6 changes: 6 additions & 0 deletions common/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@
the value MUST be a <a>node object</a>, or <a>array</a> of node objects.
If the value contains a <a>term</a> expanding to <code>@type</code>,
it's values are merged with the map value when expanding.</dd>
<dt><dfn>JSON literal</dfn></dt><dd>
A <a>JSON literal</a> is a <a>typed literal</a> where the associated <a>IRI</a> is <code>rdf:JSON</code>.
In the <a>value object</a> representation, the value of <code>@type</code> is <code>@json</code>.
JSON literals represent values which are valid JSON [[RFC8259]].
See <dfn data-cite="JSON-LD11#dfn-json-datatype" class="preserve">JSON datatype</dfn> in [[JSON-LD11]].
</dd>
<dt><dfn>typed literal</dfn></dt><dd>
A <a>typed literal</a> is a <a>literal</a> with an associated <a>IRI</a>
which indicates the literal's datatype.
Expand Down
Loading