![]() |
SynCommons und parsen von Json
Habe leider wieder ein Problem mit dem Parsen von Json.
Delphi-Quellcode:
type
PNextData = ^TNextData; TNextData = record e: LongInt; i: string; s: LongInt; t: string; et: string; i_t: string; id: LongInt; end; PNowData = ^TNowData; TNowData = record e: LongInt; i: string; s: LongInt; t: string; et: string; i_t: string; id: LongInt; end; TChannelsData = record display_alias: string; sharing: BOOL; is_radio: BOOL; title: string; cid: string; number: LongInt; next: TNextData; recording: BOOL; qualities: TQualitiesData; recommendations: BOOL; selective_recall_seconds: LongInt; now: TNowData; id: string; success: BOOL; end;
Code:
qualities ist ein array []
"channels": [
{ "display_alias": "daserste", "sharing": true, "is_radio": false, "title": "Das Erste HD", "cid": "ard", "number": 1, "next": { "e": 1610218800, "i": "http://images.zattic.com/cms/c2a2af13363a5de5014d/format_480x360.jpg", "s": 1610218620, "t": "Lotto am Samstag", "et": "Gewinnzahlen der 1. Ausspielung", "i_t": "c2a2af13363a5de5014d", "id": 206034601 }, "recording": true, "qualities": [ { "logo_black_84": "/logos/2a2a4aee64bbd6f7f817/black/84x48.png", "title": "Das Erste HD", "stream_types": [ "dash", "dash_playready", "dash_widevine", "hls7", "hls7_fairplay" ],
Delphi-Quellcode:
docQualities := docChannels.A['qualities']._[xRun];
funktioniert. Was ist aber nun next {} ? Damit geht es nicht da dies anscheinend kein Array ist.
Delphi-Quellcode:
docNext := docChannels.A['next']._[xRun];
Ist die Json falsch? oder wie muß ich den Rekord zuweisen? (Die Einträge davon) Geht leider nicht.
Delphi-Quellcode:
gChannels[i].next.t := docNext.S['t'];
|
AW: SynCommons und parsen von Json
Zitat:
Delphi-Quellcode:
Bis bald...
docNext := docChannels.O['next'];
e := docNext.I['e']; Thomas |
AW: SynCommons und parsen von Json
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 08:39 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