Profile cover photo
Profile photo
Jean-Marc Kiener
Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher. (Albert Einstein)
Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, aber bei dem Universum bin ich mir noch nicht ganz sicher. (Albert Einstein)
About
Jean-Marc's posts

Find a TJSONObject in a big nested JSON representing a Tree.

Hi Gurus,

I get entries from a database table and i should create a nested JSON String representing a tree. The database table can have tousends of entries. Each entry represents a node in the tree. The data i get is sorted by tree level, so i start going trough the entrys and create the root TJSONObjects. Then for the next level i have to find the parent TJSONObject by a value and add the current entry to the parents TJSONArray value and so on....
(I hope somebody understand what i trying to do :-))

My (recursive) implementation for finding a node seems to be very slow:

function FindNode( const Root: TJSONObject; const Caption: String ): TJSONObject;
var
Nodes: TJSONArray;
Value: TJSONValue;
begin
Result := nil;
Nodes := TJSONArray( Root.Values['nodes'] );
for Value in Nodes do begin
if TJSONObject( Value ).GetValue('caption').Value = Caption then begin
Result := TJSONObject( Value );
break;
end else begin
Result := FindNode( TJSONObject( Value ), Caption );
if assigned(Result) then
break;
end;
end;
end;

Maybe there exits some magic library to find a JSON object by value very quickly?

example:
Root.FindTJSONObjectByValue( SearchValue: string ): TJSONObject

Or maybe i am completely on the wrong path?

Any help would be great.

Post has attachment
Und noch was das weg soll..

Post has attachment
Muss meinen Gear-Park etwas redimensionieren..

Post has attachment
Praktische Dachbox zu verkaufen. Leider passen unser neuer Familienpanzer + Dachbox in keine Tiefgarage mehr. Wer also Bedarf hat..

Are Soap Webservices broken in Berlin?

Create a new soap werbserver ISAPI project and include the example functions
Compile it to a isapi.dll and deploy it.
If i want invoke per example the function "echodouble" i get a ESOAPHttpException "text/html instead of text/xml "

Compile the same project with seattle all works fine.

Are Soap Webservices broken in Berlin?

- Create a new soap werbserver ISAPI project and include the example functions
- compile it to a isapi.dll and deploy it.
If i want invoke per example the function "echodouble" i get a ESOAPHttpException "text/html instead of text/xml "

Compile the same project with seattle all works fine..

Has anything changed there?


Post has shared content

Does anybody knows how i get a student licence of Delphi XE10 Enterprise?
I have a new student here in my company who completes a four year course of study. We call this "Berufslehre" here in switzerland. He works half on the company and the other half he studied in a college.
I tryed to find out where i can get a "student" licence, but my local dealer has no idea about it.

Lehrlings Lizenzen
Hallo zusammen, ich brauche für unseren Stift eine Delphi XE10 Enterprise Lizenz. Ich habe bei ARP angefragt, die wissen nichts von einer Schüler/Ausblidungslizenz. Laut Sabine Rothe von Embarcadero Deutschland gibt es aber sowas. Weiss da jemand von euch, wohin ich mich da wenden kann?

Post has attachment
Wait while more posts are being loaded