Adobe-Consulting-Services/acs-aem-commons — pull request #327 by justinedelson (2014-09-25 01:34:14+00:00)
Title: Adding a resource provider for Generic Lists as JSON

In order to work with the Metadata Asset Editor's JSON Path option.

The Metadata Asset Editor in AEM 6 has an option to specify a JSON Path. The way this works is by resolving the path to a Resource and adapting the Resource to an InputStream and then parsing it as a JSON Object. This is *not* done via AJAX; only as a Resource.

This pull request adds support for exposing JSON representations of Generic Lists as these JSON Object Resources. It works by using a path such as _/mnt/acs-commons/lists/sharethis-services.json_ (or just _/mnt/acs-commons/lists/sharethis-services_ works fine too) where the part after _/mnt/acs-commons/lists_ is resolved to a page relative to _/etc/acs-commons/lists_ and then a JSON object is generated.