First of all, don't judge me.
I'm storing a JSON in my SharedPreferences and it has around 200KB. It is a JSON with more than 30 custom and big objects, and every time the user logs in I need this data (I know it sounds like poor design, but that's my current situation). Instead of downloading it every time, I saved it to my Preferences.
From what I've read here and here, I didn't think I'd have problems. However, I tried loging in and out a bunch of times and instead of seeing my 30 objects, I got only 16. When I log the size of this JSON, it returns me 0 (because it's incomplete and it doesn't have a EOF character?).
I tried saving its value to a file but it just didn't work (and apparently no exceptions were thrown) when creating the file.
I wanted to be sure this is the problem before moving to another solution like storing into a db, but I just didn't find information about that.
So, my question is, are Preferences "reliable" in the matter that its data is safe and the xml file won't get corrupted?
EDIT: I didn't make it very clear. I am converting my JSON to String and storing it as a value in my Preferences, and when I retrieve it I convert it back to JSON.
I misinterpreted Darren's answer and came with the idea of just saving this JSON in a separate file, apart from Preferences (harder to get corrupted?). I'll try it later and post the result.