Code and Coder: about .net core, C#, Delphi, Codetyphon, Freepascal, C++,Python, website technical records


JSON SuperObject (13) SO and SA Functions in Delphi

JSON SuperObject (13) SO and SA Functions in Delphi

Why only a few countries can create nuclear weapons

Why only a few countries can create nuclear weapons

Why are cell phone batteries not durable in winter

Why are cell phone batteries not durable in winter

JSON SuperObject (12)_TSuperEnumerator, TSuperAvlIterator, ObjectFindFirst in Delphi

JSON SuperObject (12)_TSuperEnumerator, TSuperAvlIterator, ObjectFindFirst in Delphi

JSON SuperObject (11) TSuperTableString, TSuperAvlEntry in Delphi

JSON SuperObject (11) TSuperTableString, TSuperAvlEntry in Delphi

JSON 之 SuperObject(10) Merge、Clone、ForcePath in Delphi

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls; type   TForm1 =class (TForm)     Button1: TButton;     Button2: TButton;     Button3: TButton;     procedure Button1Click (Sender: TObject);     procedure Button2Click (Sender: TObject);     procedure Button3Click (Sender: TObject);   end ; var   Form1: TForm1; implementation {$ R * .dfm} uses SuperObject; // Merge merge procedure TForm1.Button1Click (Sender: TObject);...

JSON SuperObject (9) TSuperType

unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls; type   TForm1 = class(TForm)     Button1: TButton;     Button2: TButton;     procedure Button1Click(Sender: TObject);     procedure Button2Click(Sender: TObject);   end; where   Form1: TForm1; implementation {$R *.dfm} uses SuperObject; //Types of procedure TForm1.Button1Click(Sender: TObject);   function GetJsonType(I: ISuperObject): string;   begin     case I.DataTyp...

JSON SuperObject (8)_ Several Cases of Garbled Code in Delphi

I found that SuperObject support for Chinese (or Unicode) in some places is not expected, and now a special post is proposed for the master to identify. The following examples will have garbled characters, although there may be workarounds, but if it is not garbled, it will be too All right! unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls; type   TForm1 =class (TForm)     Memo1: TMemo;     Button1: TButton;     Button2: TButton;     Butto...

JSON SuperObject (7) Double quotes that can be omitted in Delphi

uses SuperObject; procedure TForm1.Button1Click (Sender: TObject); var   jo1, jo2, jo3: ISuperObject; begin   jo1: = SO ('{"Name": "张三", "Age": "李四"}');   ShowMessage (jo1.AsJSon (False, False));   jo2: = SO ('(Name: Zhang San, Age: 李四)');   ShowMessage (jo2.AsJSon (False, False));   jo3: = SO ('(Name 1: Zhang San, Age 2: Li Si)');   ShowMessage (jo3.AsJSon (False, False)); {But if double quotes are not used, spaces before and after: will also be recognized; double quotes should still be used if possible} ...

JSON SuperObject (6) Method in Delphi

procedure Method (const This, Params: ISuperObject;var Result: ISuperObject); // Also, this is an enumeration of its data type: TSuperType = (stNull, stBoolean, stDouble, stInt, stObject, stArray, stString, stMethod); Test code: unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, StdCtrls, Keyboard; type   TForm1 =class (TForm)     Button1: TButton;     Button2: TButton;     procedure Button1Click (Sender: TObject);     procedure Button2Click ...