Json formatting error in API for Attachments

Json formatting error in API for Attachments

When querying the attachments on an order with multiple attachments, the "attachment" node is identified as a Json array in brackets [ ]:


{"response_status":{"status":"Success","messages":[{"type":"Success","message":"Attachment operation successfully completed.","statuscode":"7001"}]},"attachment ":[{"AttachmentName":"Cancelling the Forwarding Settings.docx","AttachmentId":62771,"AttachmentSize":"13.83KB"},{"AttachmentName":"QlikviewMDX.exe","AttachmentId":62772,"AttachmentSize":"44.0KB"},{"AttachmentName":"US Manual Order Template.xlsx","AttachmentId":62773,"AttachmentSize":"242.88KB"},{"AttachmentName":"Complaint Form.xltx","AttachmentId":62783,"AttachmentSize":"81.20KB"},"AttachmentName":"1452800949034.csv","AttachmentId":56574,"AttachmentSize":"3.37KB"},{"AttachmentName":"CSG HelpDesk.docx","AttachmentId":56575,"AttachmentSize":"982.11KB" }]}


When returning a single attachment, the node is not listed as an array:


{"response_status":{"status":"Success","messages":[{"type":"Success","message":"Attachment operation successfully completed.","statuscode":"7001"}]},"attachment":{"AttachmentName":"4700143179.pdf","AttachmentId":16736,"AttachmentSize":"427.48KB"}}



Shouldn't this return a single item array if only one attachment?  This causes major issues when trying to deserialize and i receive errors that the node must contain a Json array. 

Thanks


                  New to ADSelfService Plus?