lSer := TMVCJsonDataObjectsSerializer.Create; try lSer.DataSetToJsonArray(MasterDBHelper.Query, lJObj.a['m'], TMVCNameCase.ncLowerCase, [], procedure(const aField: TField; const aJsonObject: TJSONObject; var Handled: Boolean) begin if SameText(aField.FieldName, 'ma001') then begin aJsonObject.S['id'] := aField.Value; Handled := True; //原ma001值不显示 end; if SameText(aField.FieldName, 'ma003') then begin aJsonObject.S['idname'] := aField.Value; Handled := True; //原ma003值不显示 end; end); finally lSer.Free; end;
{ "id": "101", ma002": "辛潮家居", "idname": "上海辛潮家居有限公司" }
标签:begin,end,Handled,自定义,aJsonObject,JSON,lSer,aField From: https://www.cnblogs.com/redhat588/p/18361383