Skip to content

Instantly share code, notes, and snippets.

@gaurav

gaurav/test.json

Last active Dec 13, 2017
Embed
What would you like to do?
Converting a blank node from JSON-LD (test.json) -> XML/RDF (test.xml) -> JSON-LD (test_back.json) and Turtle (test_back.ttl)
{
"@context": {
"obo": "http://purl.obolibrary.org/obo/",
"denotes": {
"@id": "obo:IAO_0000219",
"@type": "@id"
}
},
"denotes": {
"denotes": "http://purl.obolibrary.org/obo/UBERON_0010527"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:obo="http://purl.obolibrary.org/obo/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
<rdf:Description rdf:nodeID="Nd04b5f2fcd1a4241af5019f8883442ee">
<obo:IAO_0000219 rdf:nodeID="N3a8bb397738a43528e5da0d128ff1a57"/>
</rdf:Description>
<rdf:Description rdf:nodeID="N3a8bb397738a43528e5da0d128ff1a57">
<obo:IAO_0000219 rdf:resource="http://purl.obolibrary.org/obo/UBERON_0010527"/>
</rdf:Description>
</rdf:RDF>
[
{
"@graph": [
{
"@id": "_:Ne2dbbb06747c4562b0b42ebccca3b79a",
"http://purl.obolibrary.org/obo/IAO_0000219": [
{
"@id": "_:N69b76b9cf976489a8b98cbd95abec4af"
}
]
},
{
"@id": "_:N69b76b9cf976489a8b98cbd95abec4af",
"http://purl.obolibrary.org/obo/IAO_0000219": [
{
"@id": "http://purl.obolibrary.org/obo/UBERON_0010527"
}
]
}
],
"@id": "file:///C:/Users/Gaurav/code/nexml2jsonld/test.xml"
}
]
@prefix obo: <http://purl.obolibrary.org/obo/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] obo:IAO_0000219 [ obo:IAO_0000219 obo:UBERON_0010527 ] .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment