aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-06-20 18:52:48 +0700
committerGravatar Ugnich Anton2013-06-20 18:52:48 +0700
commit40fe707e6566faa02eeba2e8f4830dbbd3992f4a (patch)
treeb76bdf2de7031c3475d47916a5650f8a3ca52247 /src/com
parentc1e53e34484d31584c58fa45c330e770d65879a4 (diff)
Users.arrayToString
Diffstat (limited to 'src/com')
-rw-r--r--src/com/juick/json/Users.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/com/juick/json/Users.java b/src/com/juick/json/Users.java
new file mode 100644
index 000000000..eda89ccbb
--- /dev/null
+++ b/src/com/juick/json/Users.java
@@ -0,0 +1,31 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.juick.json;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ *
+ * @author ugnich
+ */
+public class Users {
+
+ public static String arrayToString(ArrayList<com.juick.User> users) {
+ String json = "[";
+
+ Iterator<com.juick.User> i = users.iterator();
+ while (i.hasNext()) {
+ com.juick.User u = i.next();
+ if (json.length() > 1) {
+ json += ",";
+ }
+ json += "{\"uid\":" + u.UID + ",\"uname\":\"" + u.UName + "\"}";
+ }
+
+ json += "]";
+ return json;
+ }
+}