public JSONArray linksToJSON ( Collection < Link > c ) { JSONArray a = new JSONArray ( ) ; for ( Link l : c ) { a . add ( linkToJSON ( l ) ) ; } return a ; }
Convert a collection of links to an array of JSON links objects .