@Test public void splitsUpDotsIfTheyAreCommonBetweenKeysInSameObject() { String before = "{\"foo.one\":1, \"foo.two\":2}"; String after = JsonReformatter.reformat(before); String actual = removeWhiteSpace(after); assertThat(actual, is("{\"foo\":{\"one\":1,\"two\":2}}")); }
public static String reformat(String json) { try { return reformat0(json); } catch (IOException e) { throw new RuntimeException(e); } }
JsonReformatter { public static String reformat(String json) { try { return reformat0(json); } catch (IOException e) { throw new RuntimeException(e); } } }
JsonReformatter { public static String reformat(String json) { try { return reformat0(json); } catch (IOException e) { throw new RuntimeException(e); } } private  JsonReformatter(); }
JsonReformatter { public static String reformat(String json) { try { return reformat0(json); } catch (IOException e) { throw new RuntimeException(e); } } private  JsonReformatter(); static String reformat(String json); }
JsonReformatter { public static String reformat(String json) { try { return reformat0(json); } catch (IOException e) { throw new RuntimeException(e); } } private  JsonReformatter(); static String reformat(String json);  }