In today’s wtf, we will looking at a very peculiar case.
While going over the code, I noticed a very strange block. The programmer was constructing a JSON payload from available variables and then passing the payload to the visible view controller, like so:
I really don’t want to get into the details of where these hardcoded strings came from, or why the hell a JSON payload is created in the first place, but there is no limit to how bad code can be, apparently.
NOTE: I added newline separations for the reader to be able to read the code. It was actually all smushed together without any spacing.
… One more fun fact, this code lies in the infamously abused AppDelegate class.