i’m afraid the json guys will curse me if i give them the following json+ld. so the question is, can this somehow be rendered into a more json human readable form?
As a sample i useed 1) from the activityPub Specification. Convert it to turtle 2). and take 2) and convert it back to jsonld 3)
3) scares me a little ;-)
{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Sally's notes",
"type": "OrderedCollection",
"totalItems": 2,
"orderedItems": [
{
"type": "Note",
"name": "A Simple Note"
},
{
"type": "Note",
"name": "Another Simple Note"
}
]
}
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix as: <https://www.w3.org/ns/activitystreams#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b0 a as:OrderedCollection;
as:items _:genid-8e833aa393f04806ba838ee44fb57aa8-b3;
as:summary "Sally's notes";
as:totalItems "2"^^xsd:nonNegativeInteger .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
_:genid-8e833aa393f04806ba838ee44fb57aa8-b1;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid-8e833aa393f04806ba838ee44fb57aa8-b4 .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
_:genid-8e833aa393f04806ba838ee44fb57aa8-b2;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b1 a as:Note;
as:name "A Simple Note" .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b2 a as:Note;
as:name "Another Simple Note" .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix as: <https://www.w3.org/ns/activitystreams#> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix vcard: <http://www.w3.org/2006/vcard/ns#> .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b0 a as:OrderedCollection;
as:items _:genid-8e833aa393f04806ba838ee44fb57aa8-b3;
as:summary "Sally's notes";
as:totalItems "2"^^xsd:nonNegativeInteger .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
_:genid-8e833aa393f04806ba838ee44fb57aa8-b1;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:genid-8e833aa393f04806ba838ee44fb57aa8-b4 .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
_:genid-8e833aa393f04806ba838ee44fb57aa8-b2;
<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b1 a as:Note;
as:name "A Simple Note" .
_:genid-8e833aa393f04806ba838ee44fb57aa8-b2 a as:Note;
as:name "Another Simple Note" .
[ {
"@id" : "_:genid-538b1f4d46ba4971bd2f19998126d2bb-792493C5646D70B1BA5E7441CD554626",
"@type" : [ "https://www.w3.org/ns/activitystreams#Note" ],
"https://www.w3.org/ns/activitystreams#name" : [ {
"@value" : "A Simple Note"
} ]
}, {
"@id" : "_:genid-538b1f4d46ba4971bd2f19998126d2bb-AF51D26AF62D8D74BD8EED8B9C33E425",
"@type" : [ "https://www.w3.org/ns/activitystreams#Note" ],
"https://www.w3.org/ns/activitystreams#name" : [ {
"@value" : "Another Simple Note"
} ]
}, {
"@id" : "_:genid-538b1f4d46ba4971bd2f19998126d2bb-CA3F72750972911EC4FFBD740581C379",
"@type" : [ "https://www.w3.org/ns/activitystreams#OrderedCollection" ],
"https://www.w3.org/ns/activitystreams#items" : [ {
"@list" : [ {
"@id" : "_:genid-538b1f4d46ba4971bd2f19998126d2bb-792493C5646D70B1BA5E7441CD554626"
}, {
"@id" : "_:genid-538b1f4d46ba4971bd2f19998126d2bb-AF51D26AF62D8D74BD8EED8B9C33E425"
} ]
} ],
"https://www.w3.org/ns/activitystreams#summary" : [ {
"@value" : "Sally's notes"
} ],
"https://www.w3.org/ns/activitystreams#totalItems" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
"@value" : "2"
} ]
} ]
Sorry, there was an error in the second json ld box:
[ {
"@id" : "_:genid-d893965296094717aa17b315578e9694-0BEE8A4ED89FAB5FF8EB0ED84DC33231",
"@type" : [ "https://www.w3.org/ns/activitystreams#Note" ],
"https://www.w3.org/ns/activitystreams#name" : [ {
"@value" : "Another Simple Note"
} ]
}, {
"@id" : "_:genid-d893965296094717aa17b315578e9694-1BE77E66D0331B6E530E2856D60FA3CF",
"@type" : [ "https://www.w3.org/ns/activitystreams#Note" ],
"https://www.w3.org/ns/activitystreams#name" : [ {
"@value" : "A Simple Note"
} ]
}, {
"@id" : "_:genid-d893965296094717aa17b315578e9694-FC2AD3A7C64C19128DED2CE7A7900840",
"@type" : [ "https://www.w3.org/ns/activitystreams#OrderedCollection" ],
"https://www.w3.org/ns/activitystreams#items" : [ {
"@list" : [ {
"@id" : "_:genid-d893965296094717aa17b315578e9694-1BE77E66D0331B6E530E2856D60FA3CF"
}, {
"@id" : "_:genid-d893965296094717aa17b315578e9694-0BEE8A4ED89FAB5FF8EB0ED84DC33231"
} ]
} ],
"https://www.w3.org/ns/activitystreams#summary" : [ {
"@value" : "Sally's notes"
} ],
"https://www.w3.org/ns/activitystreams#totalItems" : [ {
"@type" : "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
"@value" : "2"
} ]
} ]
--
You received this message because you are subscribed to the Google Groups "RDF4J Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rdf4j-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rdf4j-users/639c8e96-9902-4d4d-aaf3-178a00edd093n%40googlegroups.com.