The first one doesn't give you a choice of what to do with the data. It will go to a file. I use the second way to, for example, send data across a network connection. It is more flexible. The 3rd way does the same thing except that you can put single objects into it. I'm not sure it will work with an array as it stands, but it might. It is even more flexible so you don't need to have an array or dictionary ready for it.
That's pretty much it. It is all about convenience vs flexibility.