The first lines of such a JSON look like this:
- Code: Select all
{
"S136" : {
"e_all_in_contract": null,
"e_cost_center": "10 3800",
...
We read the JSON into an object variable with
- Code: Select all
oEC_EIM_persons = plugins.VelocityReport.fromJSON( plugins.file.readTXTFile( jsFile.getAbsolutePath() ));
Everything works fine when the JSON is ANSI coded.
However when I switch the JSON to UTF-8 coded, Servoy prompts this strange error:
JAVASCRIPT ERROR
net.stuff.plugin.velocityreport.org.json.JSONException: Expected a ':' after a key at 3 [character 4 line 1]
Does someone know why?
I also tried to give plugins.file.readTXTFile() the second argument "UTF-8" as codepage, but that did not change anything.