[fpc-pascal] TJSONData.FindPath() troubles where data contains dots.

Michael Van Canneyt michael at freepascal.org
Wed Feb 8 17:33:25 CET 2017

On Wed, 8 Feb 2017, Graeme Geldenhuys wrote:

> Hi,
> I've studied the following documenation to make sure I'm using
> FindPath() correctly.
> http://www.freepascal.org/docs-html/3.0.0/fcl/fpjson/tjsondata.findpath.html

since . is used as a delimiter between path segments, you indeed cannot find paths
that contain a . in a segment.

I see no nice way out of this.

One way is to allow to escape dots in the path. 
But because every character is allowed in a javascript object property, that
would mean that \. can also be a correct property name, and so we need to
introduce \\ as an escape for \...

It could be added.


More information about the fpc-pascal mailing list