Gets the Json Array representation of the given list of strings.
@param keys List of strings
@return the JsonArray represents the list of keys
187115
private static JsonArray getJsonArray(List<String> keys) {
        JsonArray array = new JsonArray();
        for (String key : keys) {
            array.add(key);
        }

        return array;
    }
150705
public JSONObject getJSONObject(String key) throws JSONException {
    Object o = get(key);
    if (o instanceof JSONObject) {
      return (JSONObject) o;
    }
    throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONObject.");
  }
587440
public JSONArray names() {

        JSONArray ja = new JSONArray();
        Iterator<String> keys = keys();
        while (keys.hasNext()) {
            ja.put(keys.next());
        }
        return ja.length() == 0 ? null : ja;
    }
530466
@SuppressWarnings("rawtypes")
	public Set sunion(Object... keys) {
		Jedis jedis = getJedis();
		try {
			Set<byte[]> data = jedis.sunion(keysToBytesArray(keys));
			Set<Object> result = new HashSet<Object>();
			valueSetFromBytesSet(data, result);
			return result;
		}
		finally {close(jedis);}
	}
74225
public JSONArray getJSONArray(String name) throws JSONException {
		Object object = get(name);
		if (object instanceof JSONArray) {
			return (JSONArray) object;
		}
		else {
			throw JSON.typeMismatch(name, object, "JSONArray");
		}
	}
393607
protected static String getArray(List<String> paths) {
        StringBuilder builder = new StringBuilder();

        for (String s : paths) {
            if (builder.length() == 0) {
                builder.append(s);
            } else {
                builder.append(",").append(s);
            }
        }

        return builder.toString();
    }
619688
public <P extends ParaObject> List<P> readAll(List<String> keys) {
		if (keys == null || keys.isEmpty()) {
			return Collections.emptyList();
		}
		final int size = this.chunkSize;
		return IntStream.range(0, getNumChunks(keys, size))
				.mapToObj(i -> (List<String>) partitionList(keys, i, size))
				.map(chunk -> {
					MultivaluedMap<String, String> ids = new MultivaluedHashMap<>();
					ids.put("ids", chunk);
					return invokeGet("_batch", ids);
				})
				.map(response -> (List<P>) this.getEntity(response, List.class))
				.map(entity -> (List<P>) getItemsFromList(entity))
				.flatMap(List::stream)
				.collect(Collectors.toList());
	}
1302373
public final PJsonArray getJSONArray(final String key) {
        final JSONArray val = this.obj.optJSONArray(key);
        if (val == null) {
            throw new ObjectMissingException(this, key);
        }
        return new PJsonArray(this, val, key);
    }
1361682
public JsonArray toJsonArray(JsonArray names) throws JsonException {
        JsonArray result = new JsonArray();
        if (names == null) {
            return null;
        }
        int length = names.length();
        if (length == 0) {
            return null;
        }
        for (int i = 0; i < length; i++) {
            String name = Util.toString(names.opt(i));
            result.put(opt(name));
        }
        return result;
    }
903387
public static String jsonJoin(String[] array) {
        int arraySize = array.length;
        int bufSize = arraySize * (array[0].length() + 3);
        StringBuilder buf = new StringBuilder(bufSize);
        for (int i = 0; i < arraySize; i++) {
            if (i > 0) {
                buf.append(',');
            }

            buf.append('"');
            buf.append(array[i]);
            buf.append('"');
        }
        return buf.toString();
    }
1075981
public LazyArray getJSONArray(String key) throws LazyException{
		LazyNode token=getFieldToken(key);
		if(token.type!=LazyNode.ARRAY)throw new LazyException("Requested value is not an array",token);
		LazyArray arr=new LazyArray(token);
		arr.parent=this;
		return arr;
	}
956255
public String getString(String key) throws JSONException {
        Object object = this.get(key);
        if (object instanceof String) {
            return (String) object;
        } else if( NULL.equals(object) ) {
            return (String) null;
        }
        throw new JSONException("JSONObject[" + quote(key) + "] not a string.");
    }
610893
public @Nonnull JsonBuilder putArray(String key, String... values) {
        JsonArray jjArray = new JsonArray();
        for (String string : values) {
            jjArray.add(primitive(string));
        }
        object.put(key, jjArray);
        return this;
    }
290433
public <K> Map<K, String> getMulti(Serializer<K> keySerializer, K... keys) {
    MultigetSliceQuery<K, String,String> q = createMultigetSliceQuery(keyspace, keySerializer, serializer, serializer);
    q.setColumnFamily(CF_NAME);
    q.setKeys(keys);
    q.setColumnNames(COLUMN_NAME);

    QueryResult<Rows<K, String,String>> r = q.execute();
    Rows<K, String,String> rows = r.get();
    Map<K, String> ret = new HashMap<K, String>(keys.length);
    for (K k: keys) {
      HColumn<String,String> c = rows.getByKey(k).getColumnSlice().getColumnByName(COLUMN_NAME);
      if (c != null && c.getValue() != null) {
        ret.put(k, c.getValue());
      }
    }
    return ret;
  }
971114
private JSONArray toJsonStringArray(Collection<? extends Object> collection) {

        if (null != collection) {
            JSONArray array = new JSONArray();
            for (Object o : collection) {
                array.put("" + o);
            }
            return array;
        } else {
            return null;
        }
    }
388187
public String[] getArray(final String key, final String[] def) {
		final String[] value = getArray(key);
		if (value != null) {
			return value;
		}
		return def;
	}
859201
public JSONArray getJSONArray(K key) {
		final Object object = this.getObj(key);
		if(null == object) {
			return null;
		}
		
		if(object instanceof JSONArray) {
			return (JSONArray) object;
		}
		return new JSONArray(object);
	}