JSON { public static String sanitizeString(@Nonnull String input) { return CharMatcher.JAVA_ISO_CONTROL.and(CharMatcher.anyOf("\r\n\t")).removeFrom(input); } private  JSON(); static String sanitizeString(@Nonnull String input);  }
@Test public void sanitize() throws Exception { Assert.assertEquals("hello vivek :)", JSON.sanitizeString("hello\r vivek\n\t :)")); }