I have a question about getting Data from a SQL Database via ASP.NET and then passing the data over to Objective-C. Currently I am just using an SQL select statement to get data from the database via ASP.NET and ASP.NET returns the data like so:
<ArrayOfKeyValueOfstringPunchListCellModel84zsBx89 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<KeyValueOfstringPunchListCellModel84zsBx89>
<Key>ORC0023</Key>
<Value xmlns:d3p1="http://schemas.datacontract.org/2004/07/LHS.Models">
</Value>
</KeyValueOfstringPunchListCellModel84zsBx89>
</ArrayOfKeyValueOfstringPunchListCellModel84zsBx89>
And then in Objective-C I am putting the data in a NSDictionary like so:
NSDictionary *punchList = [[NSDictionary alloc]initWithDictionary:[NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&myError]];
Everything is working as expected here.
What I am doing now is creating a stored procedure that returns XML and have ASP.NET return the XML (everything here is completed and working as expected) The XML came out like so:
<KeyValueOfstringPunchListCellModel84zsBx89>
<Key>ORC0023</Key>
<Value>
</Value>
</KeyValueOfstringPunchListCellModel84zsBx89>
</ArrayOfKeyValueOfstringPunchListCellModel84zsBx89>
Now for you Objective-C fans, you know you can’t have XML in NSDictionary unless you use a third party item/library.
Now my question is do I have redo my stored procedure to return JSON or this there another way to go about this?
My end goal is make the process as fast as possible and the SQL query is huge and returns alot of rows.