aboutsummaryrefslogtreecommitdiff
path: root/src/com/juick/json/Users.java
blob: 0e486f74488e94bf6370d863ac9e52238e1fe840 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
    }
}