我在发帖后得到了这个结果。我不确定这个输出是什么。
a) 这是 JSON 吗?
b)当输出只是一个客户时,输出很好地映射到 NSDictionary 并使用 valueForKeyPath 方法,我能够获取每个元素的详细信息。但是,当有多个客户或客户数组时,我在将输出 id 映射到一个类时遇到问题,我尝试映射到 NSArray、NSDictionary,但没有取得多大成功。我正在使用五方软件 RESTClient ( https://github.com/FivesquareSoftware/RESTClient )。我想使用基本身份验证进行 http GET 或 http POST。如果我使用 SOAP UI,则 REST 服务输出是 JSON 编辑器可读的正确 JSON
试图弄清楚它是什么。
{
InvoiceQueryResponse =
{
ApplicationArea = {
CreationDateTime = "2013-02-09T10:30:44-08:00";
Sender = "Mobile";
};
DataArea = {
InvoiceQueryResponseDetails = {
Customer = {
CommunicationInfo = {
EmailInfo = {
Email = "lol@test.com";
};
PhoneInfo = {
TelPhoneNO = "000-000-0000";
TelPhoneRole = "Home";
};
PostalAddressInfo = {
Address = "7000 200TH ST";
City = "LONG ISLAND CITY";
PostalCD = "11101-1701";
StateProvinceCD = NY;
};
};
InvoiceID = NY201302_G240
CustomerID = G765451;
CustomerType = BUSINESS;
OrganizationNM = "Therapy Center";
PreferredLanguage = "";
ProductAssociationsInfo = {
TotalProductCount = 2;
Product = (
{
Product1 = "Vitamin B";
Qty = 20;
},
{
Product2 = "Vitamin C";
Qty = 20;
},
);
};
};
};
ServiceFooter = {
RecordCount = 1;
Status = "SUCCESS";
TimeStamp = "2013-02-09T10:30:46-08:00";
};
};
};
}