-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Have you considered supporting JSON-LD as well? I think that would be quite straightforward given that everything is in RDF. Probably the simplest thing would be to use an existing JSON-LD processor and convert the N-Triples (N-Quads) automatically to JSON-LD. With my processor (https://github.com/lanthaler/JsonLD) the code would look more or less like this:
use ML\JsonLD\JsonLD;
$document = JsonLD::fromQuads($quads);
// Optional: use short terms instead of full IRIs for properties
$document = JSONLD::compact($document, 'context.jsonld');
print JsonLD::toString($document, true);This would then output something along the lines of:
{
"@context": {
// the context used above
},
"@id": "https://my-profile.eu/people/deiu/card#me>",
"@type": "Person",
"name": "Andrei Vlad Sambra",
"givenName": "Andrei Vlad"
}Metadata
Metadata
Assignees
Labels
No labels