cosmetic: simplify code using Java 11 Set.of feature
1 file changed
tree: 62dfd28e570912997731460d263f82c2f72b9a94
  1. src/
  2. .asf.yaml
  3. .git-blame-ignore-revs
  4. .gitignore
  5. .sling-module.json
  8. Jenkinsfile
  10. pom.xml

Apache Sling

Build Status Test Status Coverage Sonarcloud Status JavaDoc Maven Central contentparser License

Apache Sling Content Parser for JSON

This module is part of the Apache Sling project.

The Apache Sling Content Parser for JSON provides support for parsing JSON files into Apache Sling resource trees, by implementing the API provided by the bundle.

To obtain a reference to the JSON content parser just filter on the ContentParser.SERVICE_PROPERTY_CONTENT_TYPE service registration property:

    @Reference(target = "(" + ContentParser.SERVICE_PROPERTY_CONTENT_TYPE + "=json)")
    private ContentParser jsonParser;