aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/api/Others.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-11-04 15:18:41 +0300
committerGravatar Vitaly Takmazov2015-11-04 15:18:41 +0300
commit63b14e7818a20d598e4634a0ee686376d7f687b2 (patch)
tree764d2924e34440e77945b1edd8501ee0aa6c1181 /src/main/java/com/juick/api/Others.java
parent9325971f2f6e2bf83e3d4d69bae3f8e63226bc63 (diff)
drop gson, refactoring
Diffstat (limited to 'src/main/java/com/juick/api/Others.java')
-rw-r--r--src/main/java/com/juick/api/Others.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/com/juick/api/Others.java b/src/main/java/com/juick/api/Others.java
index 25df5bf4..5e5c7475 100644
--- a/src/main/java/com/juick/api/Others.java
+++ b/src/main/java/com/juick/api/Others.java
@@ -1,5 +1,6 @@
package com.juick.api;
+import com.juick.json.UserSerializer;
import com.juick.server.PMQueries;
import java.io.IOException;
import java.sql.Connection;
@@ -15,6 +16,8 @@ import javax.servlet.http.HttpServletResponse;
public class Others {
Connection sql;
+
+ UserSerializer userSerializer = new UserSerializer();
public Others(Connection sql) {
this.sql = sql;
@@ -36,7 +39,7 @@ public class Others {
ArrayList<com.juick.User> lastconv = PMQueries.getPMLastConversationsUsers(sql, vuid, cnt);
if (lastconv != null && !lastconv.isEmpty()) {
- String json = "{\"pms\":" + com.juick.json.Users.arrayToString(lastconv) + "}";
+ String json = "{\"pms\":" + userSerializer.serializeList(lastconv) + "}";
Main.replyJSON(request, response, json);
} else {
response.sendError(404);