Closed baozengkai closed 6 years ago
You need to create a configuration like so
BaseConfiguration conf = new BaseConfiguration();
conf.addProperty('providers', '/path/to/mapping/folder');
UniGraph graph = UniGraph.open(conf);
@seanbarzilay Thank you for your immediate reply. I wrote the above code on IDEA, as follows: BaseConfiguration conf = new BaseConfiguration(); conf.addProperty("providers","/company/tinkerpop-server/json/"); UniGraph graph=UniGraph.open(conf); GraphTraversalSource g=graph.traversal(); System.out.println(g.V().key()); and I copy the modern.json to my folder.but When I run my application,It show me this: org.json.JSONException: A JSONObject text must begin with '{' at character 1 I checked out the modern.json file .There is no character error.and the modern.json is provided by this project.so I don't how to do next? Look forward for your reply.
Do you maybe have another file in that folder which is not a JSON file?
It works! Because my folder has a hidden file, so when I delete the hidden file, can successfully mapped.thank you for your help!
I would like to use tinkerpop connection elasticsearch, I have written a json configuration file, how should I add this configuration file to conf? The code did not talk about how to write conf on json configuration.