摘要:
在 JSON 中, 字符串应该在双引号中; 从上个例子才发现: 原来这个双引号可以省略, 有空格都行当然只是在程序代码中可以省略, 对象会自动识别添加的.即如此, 下面写法都可以:uses SuperObject;procedure TForm1.Button1Click(Sender: TObject);var jo1,jo2,jo3: ISuperObject;begin jo1 := S... 阅读全文
摘要:
SuperObject 的 JSON 对象中还可以包含 "方法", 这太有意思了; 其方法的格式是:procedure Method(const This, Params: ISuperObject; var Result: ISuperObject);//另外, 这是其数据类型的枚举:TSuperType = (stNull, stBoolean, stDouble, stInt, stObje... 阅读全文
摘要:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; procedure Button... 阅读全文
摘要:
unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button3: TButton... 阅读全文
摘要:
测试数据提前加入 Memo1 中:{ "name": "张三", /* 注释 */ "age": 33, "sex": true, "weight": 123.456, "tel": ["86-1111111", "86-2222222"], "addresses":{"address":"A省B市", "pc":"100001"}, "children": [ { "name": ... 阅读全文
摘要:
SuperObject 构建一个 JSON 的常用方法: 从字符串、从文件、从流.unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TB... 阅读全文