json-ld 3.2.0 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -7
- data/VERSION +1 -1
- data/lib/json/ld/api.rb +55 -16
- data/lib/json/ld/context.rb +7 -7
- data/lib/json/ld/expand.rb +2 -2
- data/lib/json/ld/format.rb +83 -116
- data/lib/json/ld/reader.rb +2 -2
- data/lib/json/ld/streaming_reader.rb +2 -1
- data/lib/json/ld/to_rdf.rb +9 -8
- data/lib/json/ld/writer.rb +9 -10
- data/lib/json/ld.rb +3 -0
- data/spec/api_spec.rb +67 -19
- data/spec/format_spec.rb +7 -3
- data/spec/frame_spec.rb +25 -1
- data/spec/reader_spec.rb +14 -14
- data/spec/suite_helper.rb +1 -0
- data/spec/test-files/{test-1-compacted.json → test-1-compacted.jsonld} +0 -0
- data/spec/test-files/{test-1-context.json → test-1-context.jsonld} +0 -0
- data/spec/test-files/{test-1-expanded.json → test-1-expanded.jsonld} +0 -0
- data/spec/test-files/{test-1-input.json → test-1-input.jsonld} +0 -0
- data/spec/test-files/{test-2-compacted.json → test-2-compacted.jsonld} +0 -0
- data/spec/test-files/{test-2-context.json → test-2-context.jsonld} +0 -0
- data/spec/test-files/{test-2-expanded.json → test-2-expanded.jsonld} +0 -0
- data/spec/test-files/{test-2-input.json → test-2-input.jsonld} +0 -0
- data/spec/test-files/{test-3-compacted.json → test-3-compacted.jsonld} +0 -0
- data/spec/test-files/{test-3-context.json → test-3-context.jsonld} +0 -0
- data/spec/test-files/{test-3-expanded.json → test-3-expanded.jsonld} +0 -0
- data/spec/test-files/{test-3-input.json → test-3-input.jsonld} +0 -0
- data/spec/test-files/{test-4-compacted.json → test-4-compacted.jsonld} +0 -0
- data/spec/test-files/{test-4-context.json → test-4-context.jsonld} +0 -0
- data/spec/test-files/{test-4-expanded.json → test-4-expanded.jsonld} +0 -0
- data/spec/test-files/{test-4-input.json → test-4-input.jsonld} +0 -0
- data/spec/test-files/{test-5-compacted.json → test-5-compacted.jsonld} +0 -0
- data/spec/test-files/{test-5-context.json → test-5-context.jsonld} +0 -0
- data/spec/test-files/{test-5-expanded.json → test-5-expanded.jsonld} +0 -0
- data/spec/test-files/{test-5-input.json → test-5-input.jsonld} +0 -0
- data/spec/test-files/{test-6-compacted.json → test-6-compacted.jsonld} +0 -0
- data/spec/test-files/{test-6-context.json → test-6-context.jsonld} +0 -0
- data/spec/test-files/{test-6-expanded.json → test-6-expanded.jsonld} +0 -0
- data/spec/test-files/{test-6-input.json → test-6-input.jsonld} +0 -0
- data/spec/test-files/{test-7-compacted.json → test-7-compacted.jsonld} +0 -0
- data/spec/test-files/{test-7-context.json → test-7-context.jsonld} +0 -0
- data/spec/test-files/{test-7-expanded.json → test-7-expanded.jsonld} +0 -0
- data/spec/test-files/{test-7-input.json → test-7-input.jsonld} +0 -0
- data/spec/test-files/{test-8-compacted.json → test-8-compacted.jsonld} +0 -0
- data/spec/test-files/{test-8-context.json → test-8-context.jsonld} +0 -0
- data/spec/test-files/{test-8-expanded.json → test-8-expanded.jsonld} +0 -0
- data/spec/test-files/{test-8-frame.json → test-8-frame.jsonld} +0 -0
- data/spec/test-files/{test-8-framed.json → test-8-framed.jsonld} +0 -0
- data/spec/test-files/{test-8-input.json → test-8-input.jsonld} +0 -0
- data/spec/test-files/{test-9-compacted.json → test-9-compacted.jsonld} +0 -0
- data/spec/test-files/{test-9-context.json → test-9-context.jsonld} +0 -0
- data/spec/test-files/{test-9-expanded.json → test-9-expanded.jsonld} +0 -0
- data/spec/test-files/{test-9-input.json → test-9-input.jsonld} +0 -0
- metadata +94 -89
- data/spec/test-files/test-1-normalized.json +0 -8
- data/spec/test-files/test-2-normalized.json +0 -32
- data/spec/test-files/test-3-normalized.json +0 -13
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-ld
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg Kellogg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdf
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.2.9
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '3.2'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.2.9
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: multi_json
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +112,14 @@ dependencies:
|
|
106
112
|
requirements:
|
107
113
|
- - "~>"
|
108
114
|
- !ruby/object:Gem::Version
|
109
|
-
version: '3.
|
115
|
+
version: '3.2'
|
110
116
|
type: :development
|
111
117
|
prerelease: false
|
112
118
|
version_requirements: !ruby/object:Gem::Requirement
|
113
119
|
requirements:
|
114
120
|
- - "~>"
|
115
121
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
122
|
+
version: '3.2'
|
117
123
|
- !ruby/object:Gem::Dependency
|
118
124
|
name: jsonlint
|
119
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,14 +266,14 @@ dependencies:
|
|
260
266
|
requirements:
|
261
267
|
- - "~>"
|
262
268
|
- !ruby/object:Gem::Version
|
263
|
-
version: '3.
|
269
|
+
version: '3.11'
|
264
270
|
type: :development
|
265
271
|
prerelease: false
|
266
272
|
version_requirements: !ruby/object:Gem::Requirement
|
267
273
|
requirements:
|
268
274
|
- - "~>"
|
269
275
|
- !ruby/object:Gem::Version
|
270
|
-
version: '3.
|
276
|
+
version: '3.11'
|
271
277
|
- !ruby/object:Gem::Dependency
|
272
278
|
name: rspec-its
|
273
279
|
requirement: !ruby/object:Gem::Requirement
|
@@ -357,61 +363,63 @@ files:
|
|
357
363
|
- spec/suite_remote_doc_spec.rb
|
358
364
|
- spec/suite_to_rdf_spec.rb
|
359
365
|
- spec/support/extensions.rb
|
360
|
-
- spec/test-files/test-1-compacted.
|
361
|
-
- spec/test-files/test-1-context.
|
362
|
-
- spec/test-files/test-1-expanded.
|
363
|
-
- spec/test-files/test-1-input.
|
364
|
-
- spec/test-files/test-1-normalized.json
|
366
|
+
- spec/test-files/test-1-compacted.jsonld
|
367
|
+
- spec/test-files/test-1-context.jsonld
|
368
|
+
- spec/test-files/test-1-expanded.jsonld
|
369
|
+
- spec/test-files/test-1-input.jsonld
|
365
370
|
- spec/test-files/test-1-rdf.ttl
|
366
|
-
- spec/test-files/test-2-compacted.
|
367
|
-
- spec/test-files/test-2-context.
|
368
|
-
- spec/test-files/test-2-expanded.
|
369
|
-
- spec/test-files/test-2-input.
|
370
|
-
- spec/test-files/test-2-normalized.json
|
371
|
+
- spec/test-files/test-2-compacted.jsonld
|
372
|
+
- spec/test-files/test-2-context.jsonld
|
373
|
+
- spec/test-files/test-2-expanded.jsonld
|
374
|
+
- spec/test-files/test-2-input.jsonld
|
371
375
|
- spec/test-files/test-2-rdf.ttl
|
372
|
-
- spec/test-files/test-3-compacted.
|
373
|
-
- spec/test-files/test-3-context.
|
374
|
-
- spec/test-files/test-3-expanded.
|
375
|
-
- spec/test-files/test-3-input.
|
376
|
-
- spec/test-files/test-3-normalized.json
|
376
|
+
- spec/test-files/test-3-compacted.jsonld
|
377
|
+
- spec/test-files/test-3-context.jsonld
|
378
|
+
- spec/test-files/test-3-expanded.jsonld
|
379
|
+
- spec/test-files/test-3-input.jsonld
|
377
380
|
- spec/test-files/test-3-rdf.ttl
|
378
|
-
- spec/test-files/test-4-compacted.
|
379
|
-
- spec/test-files/test-4-context.
|
380
|
-
- spec/test-files/test-4-expanded.
|
381
|
-
- spec/test-files/test-4-input.
|
381
|
+
- spec/test-files/test-4-compacted.jsonld
|
382
|
+
- spec/test-files/test-4-context.jsonld
|
383
|
+
- spec/test-files/test-4-expanded.jsonld
|
384
|
+
- spec/test-files/test-4-input.jsonld
|
382
385
|
- spec/test-files/test-4-rdf.ttl
|
383
|
-
- spec/test-files/test-5-compacted.
|
384
|
-
- spec/test-files/test-5-context.
|
385
|
-
- spec/test-files/test-5-expanded.
|
386
|
-
- spec/test-files/test-5-input.
|
386
|
+
- spec/test-files/test-5-compacted.jsonld
|
387
|
+
- spec/test-files/test-5-context.jsonld
|
388
|
+
- spec/test-files/test-5-expanded.jsonld
|
389
|
+
- spec/test-files/test-5-input.jsonld
|
387
390
|
- spec/test-files/test-5-rdf.ttl
|
388
|
-
- spec/test-files/test-6-compacted.
|
389
|
-
- spec/test-files/test-6-context.
|
390
|
-
- spec/test-files/test-6-expanded.
|
391
|
-
- spec/test-files/test-6-input.
|
391
|
+
- spec/test-files/test-6-compacted.jsonld
|
392
|
+
- spec/test-files/test-6-context.jsonld
|
393
|
+
- spec/test-files/test-6-expanded.jsonld
|
394
|
+
- spec/test-files/test-6-input.jsonld
|
392
395
|
- spec/test-files/test-6-rdf.ttl
|
393
|
-
- spec/test-files/test-7-compacted.
|
394
|
-
- spec/test-files/test-7-context.
|
395
|
-
- spec/test-files/test-7-expanded.
|
396
|
-
- spec/test-files/test-7-input.
|
396
|
+
- spec/test-files/test-7-compacted.jsonld
|
397
|
+
- spec/test-files/test-7-context.jsonld
|
398
|
+
- spec/test-files/test-7-expanded.jsonld
|
399
|
+
- spec/test-files/test-7-input.jsonld
|
397
400
|
- spec/test-files/test-7-rdf.ttl
|
398
|
-
- spec/test-files/test-8-compacted.
|
399
|
-
- spec/test-files/test-8-context.
|
400
|
-
- spec/test-files/test-8-expanded.
|
401
|
-
- spec/test-files/test-8-frame.
|
402
|
-
- spec/test-files/test-8-framed.
|
403
|
-
- spec/test-files/test-8-input.
|
401
|
+
- spec/test-files/test-8-compacted.jsonld
|
402
|
+
- spec/test-files/test-8-context.jsonld
|
403
|
+
- spec/test-files/test-8-expanded.jsonld
|
404
|
+
- spec/test-files/test-8-frame.jsonld
|
405
|
+
- spec/test-files/test-8-framed.jsonld
|
406
|
+
- spec/test-files/test-8-input.jsonld
|
404
407
|
- spec/test-files/test-8-rdf.ttl
|
405
|
-
- spec/test-files/test-9-compacted.
|
406
|
-
- spec/test-files/test-9-context.
|
407
|
-
- spec/test-files/test-9-expanded.
|
408
|
-
- spec/test-files/test-9-input.
|
408
|
+
- spec/test-files/test-9-compacted.jsonld
|
409
|
+
- spec/test-files/test-9-context.jsonld
|
410
|
+
- spec/test-files/test-9-expanded.jsonld
|
411
|
+
- spec/test-files/test-9-input.jsonld
|
409
412
|
- spec/to_rdf_spec.rb
|
410
413
|
- spec/writer_spec.rb
|
411
414
|
homepage: https://github.com/ruby-rdf/json-ld
|
412
415
|
licenses:
|
413
416
|
- Unlicense
|
414
|
-
metadata:
|
417
|
+
metadata:
|
418
|
+
documentation_uri: https://ruby-rdf.github.io/json-ld
|
419
|
+
bug_tracker_uri: https://github.com/ruby-rdf/json-ld/issues
|
420
|
+
homepage_uri: https://github.com/ruby-rdf/json-ld
|
421
|
+
mailing_list_uri: https://lists.w3.org/Archives/Public/public-rdf-ruby/
|
422
|
+
source_code_uri: https://github.com/ruby-rdf/json-ld
|
415
423
|
post_install_message:
|
416
424
|
rdoc_options: []
|
417
425
|
require_paths:
|
@@ -461,52 +469,49 @@ test_files:
|
|
461
469
|
- spec/support/extensions.rb
|
462
470
|
- spec/to_rdf_spec.rb
|
463
471
|
- spec/writer_spec.rb
|
464
|
-
- spec/test-files/test-1-compacted.
|
465
|
-
- spec/test-files/test-1-context.
|
466
|
-
- spec/test-files/test-1-expanded.
|
467
|
-
- spec/test-files/test-1-input.
|
468
|
-
- spec/test-files/test-1-normalized.json
|
472
|
+
- spec/test-files/test-1-compacted.jsonld
|
473
|
+
- spec/test-files/test-1-context.jsonld
|
474
|
+
- spec/test-files/test-1-expanded.jsonld
|
475
|
+
- spec/test-files/test-1-input.jsonld
|
469
476
|
- spec/test-files/test-1-rdf.ttl
|
470
|
-
- spec/test-files/test-2-compacted.
|
471
|
-
- spec/test-files/test-2-context.
|
472
|
-
- spec/test-files/test-2-expanded.
|
473
|
-
- spec/test-files/test-2-input.
|
474
|
-
- spec/test-files/test-2-normalized.json
|
477
|
+
- spec/test-files/test-2-compacted.jsonld
|
478
|
+
- spec/test-files/test-2-context.jsonld
|
479
|
+
- spec/test-files/test-2-expanded.jsonld
|
480
|
+
- spec/test-files/test-2-input.jsonld
|
475
481
|
- spec/test-files/test-2-rdf.ttl
|
476
|
-
- spec/test-files/test-3-compacted.
|
477
|
-
- spec/test-files/test-3-context.
|
478
|
-
- spec/test-files/test-3-expanded.
|
479
|
-
- spec/test-files/test-3-input.
|
480
|
-
- spec/test-files/test-3-normalized.json
|
482
|
+
- spec/test-files/test-3-compacted.jsonld
|
483
|
+
- spec/test-files/test-3-context.jsonld
|
484
|
+
- spec/test-files/test-3-expanded.jsonld
|
485
|
+
- spec/test-files/test-3-input.jsonld
|
481
486
|
- spec/test-files/test-3-rdf.ttl
|
482
|
-
- spec/test-files/test-4-compacted.
|
483
|
-
- spec/test-files/test-4-context.
|
484
|
-
- spec/test-files/test-4-expanded.
|
485
|
-
- spec/test-files/test-4-input.
|
487
|
+
- spec/test-files/test-4-compacted.jsonld
|
488
|
+
- spec/test-files/test-4-context.jsonld
|
489
|
+
- spec/test-files/test-4-expanded.jsonld
|
490
|
+
- spec/test-files/test-4-input.jsonld
|
486
491
|
- spec/test-files/test-4-rdf.ttl
|
487
|
-
- spec/test-files/test-5-compacted.
|
488
|
-
- spec/test-files/test-5-context.
|
489
|
-
- spec/test-files/test-5-expanded.
|
490
|
-
- spec/test-files/test-5-input.
|
492
|
+
- spec/test-files/test-5-compacted.jsonld
|
493
|
+
- spec/test-files/test-5-context.jsonld
|
494
|
+
- spec/test-files/test-5-expanded.jsonld
|
495
|
+
- spec/test-files/test-5-input.jsonld
|
491
496
|
- spec/test-files/test-5-rdf.ttl
|
492
|
-
- spec/test-files/test-6-compacted.
|
493
|
-
- spec/test-files/test-6-context.
|
494
|
-
- spec/test-files/test-6-expanded.
|
495
|
-
- spec/test-files/test-6-input.
|
497
|
+
- spec/test-files/test-6-compacted.jsonld
|
498
|
+
- spec/test-files/test-6-context.jsonld
|
499
|
+
- spec/test-files/test-6-expanded.jsonld
|
500
|
+
- spec/test-files/test-6-input.jsonld
|
496
501
|
- spec/test-files/test-6-rdf.ttl
|
497
|
-
- spec/test-files/test-7-compacted.
|
498
|
-
- spec/test-files/test-7-context.
|
499
|
-
- spec/test-files/test-7-expanded.
|
500
|
-
- spec/test-files/test-7-input.
|
502
|
+
- spec/test-files/test-7-compacted.jsonld
|
503
|
+
- spec/test-files/test-7-context.jsonld
|
504
|
+
- spec/test-files/test-7-expanded.jsonld
|
505
|
+
- spec/test-files/test-7-input.jsonld
|
501
506
|
- spec/test-files/test-7-rdf.ttl
|
502
|
-
- spec/test-files/test-8-compacted.
|
503
|
-
- spec/test-files/test-8-context.
|
504
|
-
- spec/test-files/test-8-expanded.
|
505
|
-
- spec/test-files/test-8-frame.
|
506
|
-
- spec/test-files/test-8-framed.
|
507
|
-
- spec/test-files/test-8-input.
|
507
|
+
- spec/test-files/test-8-compacted.jsonld
|
508
|
+
- spec/test-files/test-8-context.jsonld
|
509
|
+
- spec/test-files/test-8-expanded.jsonld
|
510
|
+
- spec/test-files/test-8-frame.jsonld
|
511
|
+
- spec/test-files/test-8-framed.jsonld
|
512
|
+
- spec/test-files/test-8-input.jsonld
|
508
513
|
- spec/test-files/test-8-rdf.ttl
|
509
|
-
- spec/test-files/test-9-compacted.
|
510
|
-
- spec/test-files/test-9-context.
|
511
|
-
- spec/test-files/test-9-expanded.
|
512
|
-
- spec/test-files/test-9-input.
|
514
|
+
- spec/test-files/test-9-compacted.jsonld
|
515
|
+
- spec/test-files/test-9-context.jsonld
|
516
|
+
- spec/test-files/test-9-expanded.jsonld
|
517
|
+
- spec/test-files/test-9-input.jsonld
|
@@ -1,32 +0,0 @@
|
|
1
|
-
[{
|
2
|
-
"@id": {
|
3
|
-
"@id": "http://example.org/library"
|
4
|
-
},
|
5
|
-
"http://example.org/vocab#contains": {
|
6
|
-
"@id": "http://example.org/library/the-republic"
|
7
|
-
},
|
8
|
-
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": {
|
9
|
-
"@id": "http://example.org/vocab#Library"
|
10
|
-
}
|
11
|
-
}, {
|
12
|
-
"@id": {
|
13
|
-
"@id": "http://example.org/library/the-republic"
|
14
|
-
},
|
15
|
-
"http://example.org/vocab#contains": {
|
16
|
-
"@id": "http://example.org/library/the-republic#introduction"
|
17
|
-
},
|
18
|
-
"http://purl.org/dc/elements/1.1/creator": "Plato",
|
19
|
-
"http://purl.org/dc/elements/1.1/title": "The Republic",
|
20
|
-
"@type": {
|
21
|
-
"@id": "http://example.org/vocab#Book"
|
22
|
-
}
|
23
|
-
}, {
|
24
|
-
"@id": {
|
25
|
-
"@id": "http://example.org/library/the-republic#introduction"
|
26
|
-
},
|
27
|
-
"http://purl.org/dc/elements/1.1/description": "An introductory chapter on The Republic.",
|
28
|
-
"http://purl.org/dc/elements/1.1/title": "The Introduction",
|
29
|
-
"@type": {
|
30
|
-
"@id": "http://example.org/vocab#Chapter"
|
31
|
-
}
|
32
|
-
}]
|
@@ -1,13 +0,0 @@
|
|
1
|
-
[{
|
2
|
-
"@id": {
|
3
|
-
"@id": "_:c14n0"
|
4
|
-
},
|
5
|
-
"http://xmlns.com/foaf/0.1/age": {
|
6
|
-
"@type": "http://www.w3.org/2001/XMLSchema#integer",
|
7
|
-
"@value": "41"
|
8
|
-
},
|
9
|
-
"http://xmlns.com/foaf/0.1/homepage": {
|
10
|
-
"@id": "http://manu.sporny.org/"
|
11
|
-
},
|
12
|
-
"http://xmlns.com/foaf/0.1/name": "Manu Sporny"
|
13
|
-
}]
|