-
Notifications
You must be signed in to change notification settings - Fork 555
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #2812: Reflect explicitly XSD-typed Literals in JSON-LD seriali…
…zation (#2889) * feat: Reflect explicitly XSD-typed Literals in JSON-LD serialization Supplying an XSD type argument to the rdflib.Literal datatype parameter should be reflected in JSON-LD serializations. Closes: #2812 * test: Add/modify tests for XSD-typed JSON-LD serialization Modify test "t#0018" in JSON-LD test-suite: Add XSD types to the expected JSON-LD output. Add test "t#0020" in JSON-LD test-suite: Add another test with mixed explicit typing in the input source. --------- Co-authored-by: Ashley Sommer <[email protected]>
- Loading branch information
1 parent
dc5da9b
commit 14d1006
Showing
5 changed files
with
67 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,27 @@ | ||
[ | ||
{ | ||
"@id": "http://example.com/Subj1", | ||
"http://example.com/prop": [ | ||
{ "@value": true }, | ||
{ "@value": false }, | ||
{ "@value": 1 }, | ||
{ "@value": "1.1", "@type": "http://www.w3.org/2001/XMLSchema#decimal"}, | ||
{ "@value": 0.11 } | ||
] | ||
} | ||
{ | ||
"@id": "http://example.com/Subj1", | ||
"http://example.com/prop": [ | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#boolean", | ||
"@value": true | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#boolean", | ||
"@value": false | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#integer", | ||
"@value": 1 | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#decimal", | ||
"@value": "1.1" | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#double", | ||
"@value": 0.11 | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<http://example.com/Subj1> <http://example.com/prop> "true"^^<http://www.w3.org/2001/XMLSchema#boolean> . | ||
<http://example.com/Subj1> <http://example.com/prop> "false" . | ||
<http://example.com/Subj1> <http://example.com/prop> "1" . | ||
<http://example.com/Subj1> <http://example.com/prop> "1.1"^^<http://www.w3.org/2001/XMLSchema#decimal> . | ||
<http://example.com/Subj1> <http://example.com/prop> "1.1E-1"^^<http://www.w3.org/2001/XMLSchema#double> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[ | ||
{ | ||
"@id": "http://example.com/Subj1", | ||
"http://example.com/prop": [ | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#boolean", | ||
"@value": true | ||
}, | ||
{ | ||
"@value": "false" | ||
}, | ||
{ | ||
"@value": "1" | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#decimal", | ||
"@value": "1.1" | ||
}, | ||
{ | ||
"@type": "http://www.w3.org/2001/XMLSchema#double", | ||
"@value": 0.11 | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters