Json extends PlainText { public Json removePadding(String padding) { String text = getFirstSourceText(); XTokenQueue tokenQueue = new XTokenQueue(text); tokenQueue.consumeWhitespace(); tokenQueue.consume(padding); tokenQueue.consumeWhitespace(); String chompBalanced = tokenQueue.chompBalancedNotInQuotes('(', ')'); return new Json(chompBalanced); } Json(List<String> strings);  Json(String text); Json removePadding(String padding); T toObject(Class<T> clazz); List<T> toList(Class<T> clazz); @Override Selectable jsonPath(String jsonPath);  }
@Test public void testRemovePadding() throws Exception { String name = new Json(text).removePadding("callback").jsonPath("$.name").get(); assertThat(name).isEqualTo("json"); }