Hi Vidar, Vidar Ramdal schrieb: > Hi, > > I'm using o.a.s.commons.json.jcr.JsonItemWriter.dump(NodeIterator,
I have to admit, that the JsonItemWriter is kind of strange in light of the resource tree: it dumps (part of) the repository but not the resource tree.... > Writer), and I'm experiencing that it does not output any nodes. > The method calls dumpSingleNode for each node in the iterator, and > passes a 0 for maxRecursionLevels, which makes no sense to me. This is true and desired, since this method AFAICT is intended to only dump the nodes and their properties of a NodeIterator. > > This is the only place where dumpSingleNode is used. It seems > everything works smoothly when replacing JsonItemWriter#76: > - dumpSingleNode(it.nextNode(), w, 1, 0); > + dump(it.nextNode(), w, 1, 1); > > Is there a reason why dump(NodeIterator, Writer) calls > dumpSingleNode() and not dump()? History ? On the other hand there are a lot of public and protected methods, which can probably not easily be thrown away .... Regards Felix
