Copy link to clipboard
I am trying to open a JSON file from a CEP panel.
File open dialog works fine and returns a file name like c:/tmp/test.json
readFile(filename, cep.encoding.UTF8) results in an error 2 (invalid parameter)
The json was saved with a writeFile call before and looks fine - it contains extended characters and has no BOM
What could be wrong?
Try the following
var data = cep.fs.readFile(file);
file - complete path to the file. In your case C:/tmp/test.json
I tried that first, then I added the second parameter
So, it doesn't work for you?