JCR has a built in export function [1] to produce xml and will include the content, but it will be one big ugly xml file.
A bit restricting but you could utilize webdav to get a file system like view of your content and zip that. Otherwise I think you'll just have to implement what you're specifically looking for. I've never used it before but the jackrabbit sandbox has an import/export tool [2] that might save you time implementing. [1] http://www.day.com/specs/jcr/2.0/7_Export.html [2] http://svn.apache.org/repos/asf/jackrabbit/sandbox/jackrabbit-jcr-import-expo rt-tool/src/main/java/org/apache/jackrabbit/tools/importexport/JcrImportExpor tTool.java -----Original Message----- From: David G. [mailto:[email protected]] Sent: Tuesday, January 24, 2012 9:00 AM To: [email protected] Subject: Re: Exporting nodes as JSON/Folders/Files Hi James, Sorry for not being more specific -- This will only provide the JSON (which is great) - however I need any required folder/files as well. Imagine i have a site under /content/myapp and under each /content/myapp/page-N node there are a number of image components that have actual images attached to them as nt:file's. I would need not only the JSON-tree, but also an export of actual filesys folders and files Ex. c:/export/content/myapp/page-1/_jcr_content/myimage/file Also, JSON.infinity is nice, however it would be more convenience and maintainable if each node was broken into its own JSON file -- If I have a a sub-tree that is 10 levels deep and a breadth of 100 nodes, i'd argue it would be much easier to navigate using in an IDE using folders (each w a JSON file) rather than opening up a MASSIVE JSON file and making changes in that. Thoughts? Thanks On Tue, Jan 24, 2012 at 12:40 AM, James Stansell <[email protected]> wrote: > On Mon, Jan 23, 2012 at 10:32 PM, David G. <[email protected]> wrote: > >> Are there any tools in Sling that facilities the export of JCR Node >> trees in JSON representations? (Similar to how the CRX Content Zipper >> does for XML, etc.) >> >> I'm looking to backport "initial content" out of the JCR into Maven >> projects. >> > > Hi David, > > I think you may want something like > > http://the.server/content/my/node.infinity.json > > Note that in the last year or two "infinity" has been limited so that > a deep node structure wouldn't melt the server. If your tree exceeds > the default limit there is a way to adjust it. > > Regards, > > -james.
