Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure `apoc.load.json

Error
Neo.ClientError.Procedure.ProcedureCallFailed: Failed to invoke procedure apoc.load.json: Caused by: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'topic_key': was expecting 'null', 'true', 'false' or NaN at [Source: (apoc.export.util.CountingInputStream); line: 1, column: 11]

Statement

<call apoc.load.json('file:///cred_event_TurkRatings.data') yield value
return value
limit 5>

Problem:

  1. I try to load json file stored in the import file to neo4j desktop by apoc.load.json
  2. It keeps failing to invoke procedure 'apoc.load.json', where I cannot figure out anything wrong. I am really wanna dying in the water.:scream::frowning_face:
  3. But it works well if I load some json data from API url.
    The apoc.version is 3.5.01.

What can I do now to fix this problem?

I have enabled the settings in the configuration.
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=true
dbms.security.allow_csv_import_from_file_urls=true

You can provide the full path or use the config option:

If you put it into the import directory then enable this in your config.

apoc.import.file.use_neo4j_config=true

Enable reading properties: dbms.directories.import , dbms.security.allow_csv_import_from_file_urls

hi, michael,
thank you very much for your reply.
I have enabled these command in the configuration. I have even tried to use the full path. But it still failed.
Moreover, I tried to load csv data by using apoc.load.csv, it cannot work either, which can be loaded successfully by < load csv from...> provided by cypher.

Which OS are you running?
And where exactly did you put your file.

Hi @keelong the apoc.load.csv has the following signature:
CALL apoc.load.csv('url',{config}) YIELD lineNo, list, strings, map, stringMap so you can invoke it in the following way:

CALL apoc.load.csv('file:///desktop-csv-import/orders.csv') YIELD lineNo, list, strings, map, stringMap

you can also yield a specific value, i.e.:

CALL apoc.load.csv('file:///desktop-csv-import/orders.csv') YIELD map which returns a map of values

About the apoc.load.json, the input seems not to be a valid json; just to be sure can you try to validate it with this online service?

How and where can I enable the config and the reading properties?