If you just need to pass an array of its longest possible without any problems. But I probably pass a long comma-separated string. (123,233,2344,232) and then split the string and convert it to long.
If not, I suggest you use Json Serialization. If you are using the java client, then google gson is a good option. On the client side, I will encode my list:
List<Long> test = new ArrayList<Long>(); for (long i = 0; i < 10; i++) { test.add(i); } String s = new Gson().toJson(test);
And pass this line as post param. On the server side, I will decode like this.
Type collectionType = new TypeToken<List<Long>>() { } // end new .getType(); List<Long> longList = new Gson().fromJson(longString, collectionType);
source share