For what it is worth, I opened the file written by appReadFile and copy and pasted the stringify results into a json validator, and it says the text is valid json.
Is it possible that appReadFile is inserting a hidden character somewhere?
Certainly write and read operations don't add nothing to the file to be write or read. Look at the below "index.html" sample, I try it and works as expected after apply the "trim" function, so, probably you need to apply that "trim" function too?
That did it. I'm not sure why JSON.parse can't deal with an extra whitespace character, but it's now working. Thanks!
You're welcome! Certainly, I remember the "space" issue in other environments, languages, etc... I am not completely sure where, but, when you post here the issue, what I first before anything else is to trim the JSON... just because remember that I get the same issue in the past, not related with HTML Compiler!
Everybody can read the DecSoft's support forum for learning purposes, however only DecSoft's customers can post new threads. Purchase one or more licenses of some DecSoft's products in order to give this and other benefits.