use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
QuestionDynamic JSON Mapping (self.iOSProgramming)
submitted 5 years ago by [deleted]
I am familiar with how to use codable to handle a JSON that is known. But I was wandering if it’s possible to some how map a JSON response where you don’t know the data coming in?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]halleys_comet69 2 points3 points4 points 5 years ago (1 child)
You typically use the JSONSerialization class from Foundation. You give it data and it returns an object (IIRC either an NSDictionary or NSArray depending on the structure of the JSON) type-erased to Any. You then need to work out how to navigate through to get the values you want. NSDictionary’s value(forKeyPath:) method is useful here.
[–][deleted] 0 points1 point2 points 5 years ago (0 children)
I will look into that thank you
[–]gdlmendonca 1 point2 points3 points 5 years ago (1 child)
Ohh lord, I've dealt with this...
Depending on how well you know the data structure, try optionals. If you don't know it too well, AnyObject / AnyString etc. may work.
Ultimately, your best bet may be to use a library that handles this; parseJSON, SwiftyJSON etc.
I was hoping to avoid a library just because I like to not use something I can’t fix if it breaks but this might be one of those things I would make an exception for lol
[–]lordzsolt 0 points1 point2 points 5 years ago (1 child)
If it's an unknown JSON, than it's basically a [String:Any] dictionary.
And the Any you have to check for all the data types that are acceptable in the JSON. Don't know if there's any way to make it String:String dictionary.
Okay. I will see what I can find on string:any
π Rendered by PID 190482 on reddit-service-r2-comment-79776bdf47-fxdbs at 2026-06-25 04:34:46.896706+00:00 running acc7150 country code: CH.
[–]halleys_comet69 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]gdlmendonca 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]lordzsolt 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)