code: private void writeJobStates(JsonWriter jsonWriter, List<? extends JobState> jobStates) throws IOException {
      jsonWriter.beginArray();
      for (JobState jobState : jobStates) {
        writeJobState(jsonWriter, jobState);
      }
      jsonWriter.endArray();
    }
docs: Write a list of {@link JobState}s to json document.
  
  @param jsonWriter {@link com.google.gson.stream.JsonWriter}
  @param jobStates list of {@link JobState}s to write to json document
  @throws IOException