data parameter is nil json error

By | March 3, 2015

Data parameter is nil json error 

If you are working on iOS app with json parsing, you might fall into this error:

JSON error: <error: expected ‘]’ error: 1 errors parsing expression > , ‘NSInvalidArgumentException’, reason: ‘data parameter is nil’

If you are pretty sure that the URL is okay, as well as rest of the code, but still facing this. Then first save your work, close your project window and quit XCode then restart it again. 

Now, try running the project again and you won’t get this exception.