{
"nodes": [
{
"type": "node",
"id": "21",
"labels": [
"Resource"
],
"properties": {
"description": "Process bus to interconnect Merging Unit IED, via RNA . It must be connected to a backbone with PTP and RNA functionality",
"neo4jImportId": "1",
"name": "Process bus for Merging Units",
"uuid": "42bec3b7-4789-4ef8-9f73-2968041418cf",
"category": "Bay Level",
"labels": [
"RNA",
"PTP"
]
}
}
],
"rels":
}
It seems the apoc.json.import procedure assumes a specific format, which is to have each node and relationship on separate lines. This seems to be the same format the apoc.json.export procedure uses by default ('JSON_LINES'). As such, you can export your data using apoc.json.export and import it with apoc.json.import if you use the default format during export.
The jsonFormat:'JSON' produces a map like structure. Use it if that is what you require.
clearly mentioned that The apoc.import.json procedure can be used to import JSON files created by the apoc.export.json.* procedures. The above data I have exported through apoc.import.json procedure.
Yes, the link does say that. You will notice the snippet of json they show as an example to import, which was generated by apoc.json,export.all, is in the default format. All the examples use the default format. I believe your problem is solved by exporting your database without specifying the json format, so the data is written in the default format. Afterwards, you should be eagle to import the json file and not get the null pointer exception.