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