【发布时间】:2016-02-07 07:00:24
【问题描述】:
我有一个字符串数组,例如 string[] 句子,它由每个索引中的句子组成,例如 sentences[0] 中的 This is the first message 和 sentences[1] 中的 This is the second message 等等。我将信息发送到服务器进行情感分析的 java 代码是这样的:
OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
out.write(
"[ " +
"\"Can't wait for the movie\"," +
"\"Countdown! Only ten days remaining!\" " +
"]");
out.flush();
out.close();
如何用字符串数组替换上面代码中的文本,因为它的长度是 n?
【问题讨论】:
-
如何将字符串数组添加到以下 JSON 中?,JSON 在哪里?这个问题与 JSON 无关。
-
知道了,抱歉。无论如何,如何将这个字符串数组转换为 JSON 数组?