本文介绍了从JSONArray回来转换为字符串,然后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要一个JSONArray对象存储为一个字符串,然后检索字符串,并将其转换回JSONArray。
I need to store a JSONArray object as a string then retrieve the string and convert it back to a JSONArray.
如果我做的:
JSONArray jArray;
String s = jArray.toString()
JSONArray newJArray = new JSONArray(s);
我将回到同一个对象?
Will I get back the same object?
我想存储JSONArray在SQLite数据库。
I'm trying to store a JSONArray in a SQLite database.
下面是我在寻找什么。 http://developer.android.com/reference/org/json/JSONArray.html#toString()
Here's what I'm looking at. http://developer.android.com/reference/org/json/JSONArray.html#toString()
推荐答案
只要它是一个有效的JSONArray开始说起,然后是的。
As long as it's a valid JSONArray to begin with, then yes.
这篇关于从JSONArray回来转换为字符串,然后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!