接口数据有如下规范{"error": 0, "msg": "", "data": ...} 其中数据data类型不确定.发生错误时,返回错误代码error与提示msg,反之error为0,msg为"". function GetResultData(const AStr: string; var AData: string): Boolean; var vJ: ISuperObject; begin vJ…
1. 要得到的Json数据:[{"name":"张三","age": 17},{"name":"李四","age":20}] function GetArrayJson: string; function GetPersonSO(const AName: string; AAge: Integer): ISuperObject; begin Result := SO; Result.S[…
procedure TForm1.Button1Click(Sender: TObject); var ja,jo: ISuperObject; I: Integer; begin ja := SA([]); jo :=SO(); jo.S[); ja.AsArray.Add(jo); Memo1.Lines.Add(ja.AsString);//[{"index":"10"}] jo.S[); Memo1.Lines.Add(ja.AsString);//[{&q…
(* * Super Object Toolkit * * Usage allowed under the restrictions of the Lesser GNU General Public License * or alternatively the restrictions of the Mozilla Public License 1.1 * * Software distributed under the License is distributed on an "AS IS&q…
unit uJSONDB; interface uses SysUtils, Classes, Variants, DB, DBClient, SuperObject, Dialogs; type TJSONDB = class private class function getJsonFieldNames(res: ISuperObject):TStringList ; class function getJsonFieldValues(res: ISuperObject):TStringL…