public static ArrayWritable jsonArrayStringtoArrayWritable(String jsonString){
  String modString=jsonString.replaceFirst("\\[","");
  modString=modString.replaceFirst("\\]","");
  modString=modString.replaceAll("\"","");
  String[] elements=modString.split("\\s*,\\s*");
  logger.debug("elements = ");
  for (  String element : elements) {
    logger.debug("element: " + element);
  }
  return new ArrayWritable(elements);
}

public static ArrayWritable jsonArrayStringtoArrayWritable ( String jsonString ) { String modString = jsonString . replaceFirst ( "\\[" , "" ) ; modString = modString . replaceFirst ( "\\]" , "" ) ; modString = modString . replaceAll ( "\"" , "" ) ; String [ ] elements = modString . split ( "\\s*,\\s*" ) ; logger . debug ( "elements = " ) ; for ( String element : elements ) { logger . debug ( "element: " + element ) ; } return new ArrayWritable ( elements ) ; }
method to take an input json array format string and output an arraywritable
