BundledDocumentDiffer { void diffChildren(Collection<String> fromChildren, Collection<String> toChildren, JsopWriter w){ for (String n : fromChildren){ if (!toChildren.contains(n)){ w.tag('-').value(n); } else { w.tag('^').key(n).object().endObject(); } } for (String n : toChildren){ if (!fromChildren.contains(n)){ w.tag('+').key(n).object().endObject(); } } } BundledDocumentDiffer(DocumentNodeStore nodeStore); boolean diff(AbstractDocumentNodeState from, AbstractDocumentNodeState to, JsopWriter w);  }
@Test public void jsopDiff() throws Exception{ JsopWriter w = new JsopBuilder(); differ.diffChildren(of("a", "b"), of("b", "c"), w); assertEquals("-\"a\"^\"b\":{}+\"c\":{}", w.toString()); }