x-superobject】的更多相关文章

SuperObject 的 JSON 对象中还可以包含 "方法", 这太有意思了; 其方法的格式是: procedure Method(const This, Params: ISuperObject; var Result: ISuperObject); //另外, 这是其数据类型的枚举: TSuperType = (stNull, stBoolean, stDouble, stInt, stObject, stArray, stString, stMethod); 测试代码: un…
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(Sen…
uses superobject; procedure TForm1.FormCreate(Sender: TObject); var aJson: ISuperObject; aSuperArray: TSuperArray; i:Integer; begin {1.赋初值} aJson:=SO('{"zoo":"涂磊动物园","animals":[{"name":"猴子","year"…
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(Sen…
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);     pro…
这几天学习 JSON - SuperObject, 非常幸运地得到了其作者 Henri Gourvest 大师的同步指点! (Henri 大师也是 DSPack 和 GDI+ 头文件的作者; 大师是法国人, 竟能用中文给我回复, 没想到!). 学习中发现 SuperObject 有些地方对中文(或者说 Unicode)支持不是所期望的, 现在专贴提出来供大师鉴别. 以下例子都会出现乱码, 虽然都可以有变通的方案, 但如果不乱码就太好了! unit Unit1; interface uses  …
SuperObject 的 JSON 对象中还可以包含 "方法", 这太有意思了; 其方法的格式是: procedure Method(const This, Params: ISuperObject; var Result: ISuperObject); //另外, 这是其数据类型的枚举: TSuperType = (stNull, stBoolean, stDouble, stInt, stObject, stArray, stString, stMethod); 测试代码: un…
在 JSON 中, 字符串应该在双引号中; 从上个例子才发现: 原来这个双引号可以省略, 有空格都行 当然只是在程序代码中可以省略, 对象会自动识别添加的. 即如此, 下面写法都可以: uses SuperObject; procedure TForm1.Button1Click(Sender: TObject); var   jo1,jo2,jo3: ISuperObject; begin   jo1 := SO('{"Name":"张三", "Age&…
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(Sen…
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);     pro…