cancel
Showing results for 
Search instead for 
Did you mean: 

Convert JSON to Turtle format

Isha
Node Clone

Hi
I have a json response object, I would like using python script to convert this json response to turtle file.
Did soomeone already tried this ? Or any Resources you found helpful ?

I found some resources, not sure how to take this forward, so looking for your ideas.
these are the resources,
JSON Serializer plugin
RML

TIA

2 REPLIES 2

jesus_barrasa
Graph Fellow

A bit convoluted but since you ask here, it's an option.
It's an experimental method that takes any random JSON and imports it into Neo4j as a tree. You need to pass a node where the tree will be linked to.
Once imported you can export in any RDF serialisation.


match (p:LinkageNode) with p 
call n10s.experimental.importJSONAsTree(p, '{
    "glossary": {
        "title": "example glossary",
		"GlossDiv": {
            "title": "S",
			"GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
					"SortAs": "SGML",
					"GlossTerm": "Standard Generalized Markup Language",
					"Acronym": "SGML",
					"Abbrev": "ISO 8879:1986",
					"GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
						"GlossSeeAlso": ["GML", "XML"]
                    },
					"GlossSee": "markup"
                }
            }
        }
    }
}') yield node
return node


paritosh_deshmu
Node Link

@jesus_barrasa  is it possible to share some info on the method " call n10s.experimental.importJSONAsTree" is there function that can be used for XML file.