code: public static void writeStringListToConfAsJson(String key,
                                                   List<String> list,
                                                   Configuration conf) {
      Preconditions.checkNotNull(list);
      conf.set(key, JSONArray.toJSONString(list));
    }
docs: Writes a list of strings into a configuration by converting it to a json array
  
  @param key for the configuration
  @param list to write
  @param conf to write to