用superobject就行了,网上全是源码 function DecodeS2CJsonToHead(const src:String; var head:TERP_S2C_Head; var jsonobj:ISuperObject):Boolean; var mainobj:ISuperObject; begin Result := False; try mainobj := SO(src); if (mainobj <> nil) then begin head.seq_no := mainobj.I['seq_no']; head.checked := mainobj.B['checked']; if mainobj.O['msg_type'] = nil then head.msg_type := -1 else head.msg_type := mainobj.I['msg_type']; head.broker := mainobj.S['broker']; head.account := mainobj.S['account']; jsonobj := mainobj; result := True; end; except Result := false; end; end; 简单方便