例如,销售订单,订单明细的子单据体交货明细的交货地址,应该怎么构建JSON?
尝试这个构建:
\"FSaleOrderEntry\":[{\"FBASEUNITID\":{\"FNumber\":\"个\"},\"FDeliveryDate\":\"2016-05-16\",\"FOrderEntryPlan\":{\"FDetailLocAddress\":\"XXXXXXXXXXXXXXXXX\"},\"FEntryID\":0,\"FEntryNote\":\"\",\"FIsFree\":false,\"FMaterialId\":{\"FNumber\":\"000981\"},\"FQty\":1,\"FReturnType\":\"\",\"FTaxPrice\":33.00,\"FUnitID\":{\"FNumber\":\"个\"},\"F_abc_Amount\":8.000,\"F_appDetail\":\"贝(L)\"}]
报错信息:
{"Result":{"ResponseStatus":{"ErrorCode":500,"IsSuccess":false,"Errors":[{"FieldName":"无法将类型为“System.Collections.Generic.KeyValuePair`2[System.String,System.Object]”的对象强制转换为类型???System.Collections.Generic.Dictionary`2[System.String,System.Object]”???","Message":" ?? Kingdee.BOS.WebApi.FormService.MapPropertyService.MapComplexProperty(String pkProperty, Dictionary`2 sourceObj, DynamicObject targetObj, Int32 rowIndex, HashSet`1 NeedUpDateFields)\r\n ?? Kingdee.BOS.WebApi.FormService.MapPropertyService.MapCollectionProperty(Entity enity, IList`1 sourceRows, DynamicObjectCollection targetRows, HashSet`1 NeedUpDateFields, String specialReferenceTable)\r\n ?? Kingdee.BOS.WebApi.FormService.MapPropertyService.MapComplexProperty(String pkProperty, Dictionary`2 sourceObj, DynamicObject targetObj, Int32 rowIndex, HashSet`1 NeedUpDateFields)\r\n ?? Kingdee.BOS.WebApi.FormService.Save.Execute()\r\n ?? Kingdee.BOS.WebApi.FormService.BillOperationService.ExecuteOperation(FormOperation op, String data)","DIndex":0}],"SuccessEntitys":[]}}}
推荐阅读