I'm using this query to format my data for Keylines.
CALL apoc.export.json.query("MATCH (actor: Actor {name: $nameParam})-[acted:ACTED_IN]->(movie:Movie) MATCH (movie)<--(a:Actor) RETURN movie, actor,count(distinct a) AS degree",null,{config:{jsonFormat:'JSON'}, params:{nameParam:'Johnny Depp'}, stream: true})
I'm trying to use the ARRAY_JSON value for the jsonFormat configuration but whether I use any of them [ARRAY_JSON, JSON, JSON_LINES,JSON_ID_AS_KEYS] the result in the data column doesn't change.
It's like the jsonFormat does nothing, even if the query itself works.
CALL apoc.export.json.query("MATCH (actor: Actor {name: $name})-[acted:ACTED_IN]->(movie:Movie) MATCH (movie)<--(a:Actor) RETURN movie, actor,count(distinct a) AS degree",null,{jsonFormat:'ARRAY_JSON', params:{name:'Johnny Depp'}, stream: true})
When I use jsonFormat as a part of the config: {} parameter like you did it doesn't work. Whether I use any of them [ARRAY_JSON, JSON, JSON_LINES,JSON_ID_AS_KEYS] the result in the data column doesn't change. I had to put the jsonFormat like this in the query:
CALL apoc.export.json.query("MATCH (actor: Actor {name: $name})-[acted:ACTED_IN]->(movie:Movie) MATCH (movie)<--(a:Actor) RETURN movie, actor,count(distinct a) AS degree",null,{jsonFormat:'ARRAY_JSON', params:{name:'Johnny Depp'}, stream: true})
But the documentation say that jsonFormat should be a part of config parameter.
I did the test again and indeed with this form "config:{jsonFormat:'ARRAY_JSON'}" the jsonFormat is ignored with Neo4j 4.2.3 and apoc-4.2.0.1.jar