Search Results

Search found 2 results on 1 pages for 'eddit'.

Page 1/1 | 1 

  • iPhone, special characters in JSON Response

    - by eddit
    Writing an iphone app, and I'm getting my data from a REST API that returns JSON. My problem is, some of the data has special characters embedded and Im getting errors. Example: MartÌn Petite-RiviËre-Saint-FranÁois Here is my current code: NSString *jsonString = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding]; NSMutableArray *tempResults = [[[jsonString JSONValue] objectForKey:@"getRegionResortsLastUpdatedResponse"] objectForKey:@"return"]; Whenever the data has special characters in it "jsonString" return "(null)", otherwise everything works fine. Is this something I can handle on my end, or does the API need to be modified to output the character codes?

    Read the article

  • Tuple conversion to a string

    - by David542
    I have the following list: [('Steve Buscemi', 'Mr. Pink'), ('Chris Penn', 'Nice Guy Eddie'), ...] I need to convert it to a string in the following format: "(Steve Buscemi, Mr. Pink), (Chris Penn, Nice Guy Eddit), ..." I tried doing str = ', '.join(item for item in items) but run into the following error: TypeError: sequence item 0: expected string, tuple found How would I do the above formatting?

    Read the article

1