Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   JSON zweidimensionales Array (https://www.delphipraxis.net/154153-json-zweidimensionales-array.html)

Looper 30. Aug 2010 13:55

JSON zweidimensionales Array
 
Hallo,
ich habe hier ein Array in JSON Notifikation:
Code:
   var map = [['block', 'forest_out_1_1', 'Wald', '', 1, 1], ['block', 'forest_out_1_2', 'Wald', '', 1, 1]]
Doch wie schaffe ich es dieses Array in Delphi einzulesen. Benutze die SuperObject-Datei.
Mein Delphi Code sieht z.B. so aus:
Delphi-Quellcode:
    obj : TSuperArray;

    IDs := http.Post('http:\\localhost\bg\map.js',param);
    ShowMessage(ids);
    obj := SO(IDs).AsArray;
    ShowMessage(IntToHex(Integer(obj),8));
    ShowMessage(obj.O[0].AsArray[0].S['0']);
Lustigerweise ist obj immer nil. Aber wieso?

mfg Janek

Looper 30. Aug 2010 14:11

AW: JSON zweidimensionales Array
 
Problem gelöst. Die Anführungszeichen müssen natürlich richtig sein :wall:


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:47 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