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