Skip to content

Commit d79a1ae

Browse files
committed
Fix JSON-LD datatype handling.
1 parent 22df220 commit d79a1ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/datasources/JsonLdDatasource.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function extractTriples(json, addTriple, done) {
4444
});
4545
}
4646

47-
// Converts a jsonld.js entity to an N3.js IRI or literal
47+
// Converts a jsonld.js entity to the N3.js in-memory representation
4848
function convertEntity(entity) {
4949
// Return IRIs and blank nodes as-is
5050
if (entity.type !== 'literal')
@@ -55,7 +55,7 @@ function convertEntity(entity) {
5555
return '"' + entity.value + '"@' + entity.language;
5656
// Add a datatype to the literal if present
5757
if (entity.datatype !== 'http://www.w3.org/2001/XMLSchema#string')
58-
return '"' + entity.value + '"^^<' + entity.datatype + '>';
58+
return '"' + entity.value + '"^^' + entity.datatype;
5959
// Otherwise, return the regular literal
6060
return '"' + entity.value + '"';
6161
}

0 commit comments

Comments
 (0)