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
sequences.
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 t
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?
Does it work if you try "d:\\data"?
g.
--
Proud owner of F-15C 80-0007
http://
On 2017-01-26 10:56, Karoly Balogh (Charlie/SGR) wrote:
>> Is such escape sequence processing a JSON standard?
>
> Yes. See:
> http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf
Ah, thanks for confirming that. I see now the relevant JSON standards
information regarding a s
On 2017-01-26 10:54, Graeme Geldenhuys wrote:
> So it seems the FPC JSON parser doesn't like DOS\Windows paths as data
> values.
I guess the alternative (in case \ is supposed to be
interpreted as an escape sequence) is to store my DOS\Windows paths with
forward slashes like UNIX, then use SetDirS
Hi,
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?
Yes. See:
http://www.ecma-international.org/publications/files/ECMA-ST/EC
Just to be clear regarding the problem.
If I change my JSON file so the data values reads...
"d:/data"
instead of the original: "d:\data"
...then FPC's JSON parser has no problem.
So it seems the FPC JSON parser doesn't like DOS\Windows paths as data
values. Surely any JSON parser shouldn'
Hi,
I have the following snippet in a JSON file.
"Settings": {
"SQLDir": "d:\data"
}
When I load the complete JSON file using FPC's jsonparser.pp unit I get
a parser error.
"Invalid character at line 6, pos 16: 'd'