Einzelnen Beitrag anzeigen

Bbommel

Registriert seit: 27. Jun 2007
Ort: Köln
648 Beiträge
 
Delphi 12 Athens
 
#5

AW: TJsonValue mit Punkt im ValueNamen

  Alt 2. Sep 2021, 13:16
Und hier noch etwas von den Kollegen von Stackoverflow: https://stackoverflow.com/questions/...json-in-delphi

Läuft letztlich wohl darauf hinaus, dass, wenn du die Generics-Methoden oder FindValue nutzen willst, mit
Code:
'["@odata.etag"]'
statt
Code:
'@odata.etag'
arbeiten musst.

Edit:
Noch aus der Delphi-Doku dazu:
Zitat:
Supported JSON Path Syntax

TJSONPathParser implements a subset of the JSON path specification defined by Stefan Göessner. Specifically, supported elements are:

Child operators for objects:
Use . to access object properties that do not contain a dot in their name. For example, use root.child to access the child property of the root object.
Use [] to access object properties that do contain a quoting character in their name. For example, use root['child.name'] or root["child.name"] to access the child.name property of the root object.

Geändert von Bbommel ( 2. Sep 2021 um 13:18 Uhr)
  Mit Zitat antworten Zitat