[fpc-pascal] Finding the path of a TJSONObject?

Michael Van Canneyt michael at freepascal.org
Thu Jun 16 17:48:46 CEST 2016



On Thu, 16 Jun 2016, Graeme Geldenhuys wrote:

> Hi,
>
> Is there a method (just so you know GetPath() wasn't it) that returns
> the "path" or hierarchy of a TJSONObject instance?
>
> eg:
> I can do:
>
>  obj := lRootData.Find('Report.Pages.0.Watermark.Font');
>
> But how do I do the reverse. Lets say I have a TJSONObject instance in
> the obj variable. How do I query the path to that object in the whole
> JSON hierarchy - the 'Report.Pages.0.Wartermark.Font' text listed above?

You can't.

There is no reference to the owner.

Michael.



More information about the fpc-pascal mailing list