I need to store a JSONArray object as a string then retrieve the string and convert it back to a JSONArray.
If I do:
JSONArray jArray;
String s = jArray.toString()
JSONArray newJArray = new JSONArray(s);
Will I get back the same object?
I'm trying to store a JSONArray in a SQLite database.
Here's what I'm looking at. http://developer.android.com/reference/org/json/JSONArray.html#toString()
asked May 12, 2011 at 20:15
Nick Rempel
3,0222 gold badges25 silver badges31 bronze badges
1 Answer 1
As long as it's a valid JSONArray to begin with, then yes.
answered May 12, 2011 at 20:37
Jason Robinson
31.3k19 gold badges81 silver badges132 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-java