code: private void writeResources(List<Resource> resources)
              throws JsonGenerationException, IOException {
  
          List<String> resourceStrings = new ArrayList<String>();
  
          for (Resource resource : resources) {
              resourceStrings.add(resource.getId());
          }
          writeJsonArray(JsonDocumentFields.RESOURCE, resourceStrings);
      }
docs: Writes the list of <code>Resource</code>s to the JSONGenerator.
  
  @param resources
  the list of resources to be written.