如何在 android 中将字符串数组转换为 json
How to convert string array to json in android
以下是我的 JSONArray
数据 如何将其转换为 StringArray
?
private void getTextfromalledittext()
{
String textpoint[]=new String[editTextList.size()];
int i=0;
for(EditText editText:editTextList)
{
textpoint[i]=editText.getText().toString();
i++;
}
}
像这样实现 -
private void getTextfromalledittext(){
String textpoint[]=new String[editTextList.size()];
int i=0;
for (EditText editText:editTextList) {
textpoint[i]=editText.getText().toString();
i++;
}
JSONArray jsonArray = new JSONArray(Arrays.asList(textpoint));
}
以下是我的 JSONArray
数据 如何将其转换为 StringArray
?
private void getTextfromalledittext()
{
String textpoint[]=new String[editTextList.size()];
int i=0;
for(EditText editText:editTextList)
{
textpoint[i]=editText.getText().toString();
i++;
}
}
像这样实现 -
private void getTextfromalledittext(){
String textpoint[]=new String[editTextList.size()];
int i=0;
for (EditText editText:editTextList) {
textpoint[i]=editText.getText().toString();
i++;
}
JSONArray jsonArray = new JSONArray(Arrays.asList(textpoint));
}