我从 Refit 休息服务(WorkflowMax API)返回了这个 XML:
<Response api-method=\"Current\"><Status>OK</Status><Jobs><Job><ID>J000002</ID><Name>Callout</Name><Description></Description><Client><ID>20970938</ID><Name>Big Co</Name></Client><ClientOrderNumber></ClientOrderNumber><State>Planned</State><StartDate>2019-04-25T00:00:00</StartDate><DueDate>2019-06-01T00:00:00</DueDate><Contact><ID>12918947</ID><Name>A Smith</Name></Contact><InternalID>34476268</InternalID><Manager><ID>787929</ID><Name>T Smith</Name></Manager><Partner><ID>787929</ID><Name>T Smith</Name></Partner><Assigned><Staff><ID>787929</ID><Name>T Smith</Name></Staff></Assigned></Job><Job><ID>J000003</ID><Name>Call </Name><Description></Description><Client><ID>20982774</ID><Name>Test Group</Name></Client><ClientOrderNumber></ClientOrderNumber><State>Planned</State><StartDate>2019-04-25T00:00:00</StartDate><DueDate>2019-04-25T00:00:00</DueDate><Contact><ID>12924082</ID><Name>S Smith</Name></Contact><InternalID>34476286</InternalID><Partner><ID>787929</ID><Name>T Smith</Name></Partner><Assigned><Staff><ID>787929</ID><Name>T Smith</Name></Staff></Assigned></Job></Jobs></Response>
我希望转换为多个 C# Job 对象。有人可以建议一个简单的方法吗?
尝试使用 Visual Studio Paste Special 'Paste XML as Classes' 并仅粘贴到 XML 的单个“作业”部分中,它会产生一个相当复杂的类,然后不知道如何反序列化到它产生的类中