Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.195 Beiträge
 
Delphi 12 Athens
 
#2

AW: JSON mit Punkt im Namen

  Alt 5. Apr 2023, 11:05
Vielleicht mit " oder ' oder \ escapen
Delphi-Quellcode:
sProperties_3 := JSONValue.GetValue<string>('data['+inttostr(i)+'].properties."debug.monitor".name');

sProperties_3 := JSONValue.GetValue<string>('data['+inttostr(i)+'].properties.''debug.monitor''.name');

sProperties_3 := JSONValue.GetValue<string>('data['+inttostr(i)+'].properties.debug\.monitor.name');
oder kann man eventuell auch \ bzw. / als Node-Separator benutzen?
Delphi-Quellcode:
sProperties_3 := JSONValue.GetValue<string>('data['+inttostr(i)+']\properties\debug.monitor\name');

sProperties_3 := JSONValue.GetValue<string>('data['+inttostr(i)+']\\properties\\debug.monitor\\name');

sProperties_3 := JSONValue.GetValue<string>('data['+inttostr(i)+']/properties/debug.monitor/name');
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu ( 5. Apr 2023 um 11:08 Uhr)
  Mit Zitat antworten Zitat