On 2017-01-26 10:54, Graeme Geldenhuys wrote:
> So it seems the FPC JSON parser doesn't like DOS\Windows paths as data
I guess the alternative (in case \<something> is supposed to be
interpreted as an escape sequence) is to store my DOS\Windows paths with
forward slashes like UNIX, then use SetDirSeparators() in my program to
fix the resulting string.
In reply to this post by Karoly Balogh (Charlie/SGR)
> On Thu, 26 Jan 2017, Graeme Geldenhuys wrote:
>> It seems like it is trying to interpret the field data value like a
>> C/C++ escape sequence. eg: \n meaning NewLine
>> I such escape sequence processing a JSON standard?
On 2017-01-26 14:31, geneb wrote:
> Does it work if you try "d:\\data"?
Yes. My problem was I didn't realise the JSON standard supports escaped
My program is only reading from the JSON file at this point, not
writing. The JSON file is manually created with a text editor. So to be
on the safe side, I now implemented my code to support both "d:/data"
and "d:\\data" string data formats.