AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

JSON mit Punkt im Namen

Ein Thema von Andreas Schilling · begonnen am 5. Apr 2023 · letzter Beitrag vom 6. Apr 2023
 
Benutzerbild von himitsu
himitsu

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

AW: JSON mit Punkt im Namen

  Alt 5. Apr 2023, 11:20


Delphi-Quellcode:
  /// <summary> Parses a JSON path with names and indexes.</summary>
  /// <remarks>
  /// The syntax to write paths is similar to XPath but in a Json way.
  /// The following XPath expression:
  /// /entities/urls[0]/indices[1]
  /// would look like
  /// entities.urls[0].indices[1] (dot notation)
  /// or
  /// entities["urls"][0]["indices"][1] (bracket notation)
  ///
  /// The dot (.) token is used to access the object elements:
  /// ex: object.key
  ///
  /// The bracket ([]) token is used to access array or object elements:
  /// In array: cities[0]
  /// In object: city["name"] or city['name']
  /// In object: ["city"]["name"] or ['city']['name']
  ///
  /// The quote (" or ') is used to introduce a literal when the element is being written in bracket notation:
  /// ex:["first"]["second"] or ['first']['second']
  ///
  /// To escape the quote in a literal use backslash (\): \"
  /// ex: ["quotes(\").should.be.escaped"] or ['quotes(\').should.be.escaped']
  ///
  /// Note: The backslash will only escape quotes within a literal. Bracket notation can be useful when
  /// names can not be written in dot notation, like the objects keys with dot characters:
  /// ex: object["key.with.dots"] or object['key.with.dots']
  ///
  /// </remarks>
  TJSONPathParser = record
Zitat:
Note: The backslash will only escape quotes within a literal. Bracket notation can be useful when
names can not be written in dot notation, like the objects keys with dot characters
:
ex: object["key.with.dots"] or object['key.with.dots']
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:01 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz