-
Notifications
You must be signed in to change notification settings - Fork 35
Add JSON literal tests. #559
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
base: main
Are you sure you want to change the base?
Changes from all commits
c9ffc91
8ec7642
1d35fc0
c20ddc5
8d1953a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1405,6 +1405,15 @@ | |||||
"input": "compact/ep15-in.jsonld", | ||||||
"context": "compact/ep15-context.jsonld", | ||||||
"expectErrorCode": "invalid container mapping" | ||||||
}, { | ||||||
"@id": "#tej01", | ||||||
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"], | ||||||
"name": "Multiple JSON values for a JSON literal properties", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Goes with change elsewhere
Suggested change
|
||||||
"purpose": "Tests compacting multiple JSON values for a JSON literal property.", | ||||||
"input": "compact/ej01-in.jsonld", | ||||||
"context": "compact/ej01-context.jsonld", | ||||||
"expectErrorCode": "multiple JSON literals", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tin01", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
|
@@ -1549,6 +1558,51 @@ | |||||
"context": "compact/js11-context.jsonld", | ||||||
"expect": "compact/js11-out.jsonld", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tjs12", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
"name": "Compact JSON literal (empty array)", | ||||||
"purpose": "Tests compacting property with @type @json to a JSON literal (empty array).", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"input": "compact/js12-in.jsonld", | ||||||
"context": "compact/js12-context.jsonld", | ||||||
"expect": "compact/js12-out.jsonld", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tjs13", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
"name": "Compact JSON literal (array with string)", | ||||||
"purpose": "Tests compacting property with @type @json to a JSON literal (array with string).", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
"input": "compact/js13-in.jsonld", | ||||||
"context": "compact/js13-context.jsonld", | ||||||
"expect": "compact/js13-out.jsonld", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tjs14", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
"name": "Compact JSON literal and non-JSON with @json property", | ||||||
"purpose": "Tests compacting property with @type @json with JSON literal and non-JSON.", | ||||||
"input": "compact/js14-in.jsonld", | ||||||
"context": "compact/js14-context.jsonld", | ||||||
"expect": "compact/js14-out.jsonld", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tjs15", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
"name": "Compact JSON literal and non-JSON without @json property", | ||||||
"purpose": "Tests compacting property without @type @json with JSON literal and non-JSON.", | ||||||
"input": "compact/js15-in.jsonld", | ||||||
"context": "compact/js15-context.jsonld", | ||||||
"expect": "compact/js15-out.jsonld", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tjs16", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
"name": "Compact JSON literal and non-JSON with and without @json property", | ||||||
"purpose": "Tests compacting property with and without @type @json with JSON literal and non-JSON.", | ||||||
"input": "compact/js16-in.jsonld", | ||||||
"context": "compact/js16-context.jsonld", | ||||||
"expect": "compact/js16-out.jsonld", | ||||||
"option": {"specVersion": "json-ld-1.1"} | ||||||
}, { | ||||||
"@id": "#tla01", | ||||||
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"], | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[{ | ||
"http://example.org/vocab#value": [{ | ||
"@value": ["JSON1"], | ||
"@type": "@json" | ||
}, { | ||
"@value": ["JSON2"], | ||
"@type": "@json" | ||
}] | ||
}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[{ | ||
"http://example.org/vocab#value": [{ | ||
"@value": ["string"], | ||
"@type": "@json" | ||
}] | ||
}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
}, | ||
"e": ["string"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[{ | ||
"http://example.org/vocab#value": [{ | ||
"@value": [], | ||
"@type": "@json" | ||
}] | ||
}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
}, | ||
"e": [] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[{ | ||
"http://example.org/vocab#value": [{ | ||
"@value": [], | ||
"@type": "@json" | ||
}, | ||
"non-JSON" | ||
] | ||
}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value", "@type": "@json"} | ||
}, | ||
"e": [], | ||
"http://example.org/vocab#value": "non-JSON" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value"} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[{ | ||
"http://example.org/vocab#value": [{ | ||
"@value": [], | ||
"@type": "@json" | ||
}, | ||
"non-JSON" | ||
] | ||
}] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"@context": { | ||
"@version": 1.1, | ||
"e": {"@id": "http://example.org/vocab#value"} | ||
}, | ||
"e": [ | ||
{ | ||
"@type": "@json", | ||
"@value": [] | ||
}, | ||
"non-JSON" | ||
] | ||
} |
Uh oh!
There was an error while loading. Please reload this page.