diff options
author | Vitaly Takmazov | 2015-10-31 01:35:22 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2015-10-31 01:35:22 +0300 |
commit | 5f4602b34ccc3f899edd45e5e541cbb7307c9585 (patch) | |
tree | d9dc7924e19740f97a36d5d905ff5c4aed81b2de /src/main/java/com/juick/json/Users.java | |
parent | 94dba01c5581e43b618d6828ed1b378fd63461a8 (diff) |
moved to Gradle
Diffstat (limited to 'src/main/java/com/juick/json/Users.java')
-rw-r--r-- | src/main/java/com/juick/json/Users.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/com/juick/json/Users.java b/src/main/java/com/juick/json/Users.java new file mode 100644 index 00000000..0e486f74 --- /dev/null +++ b/src/main/java/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 += User.toJSON(u).toString(); + } + + json += "]"; + return json; + } +} |