Class JsonContentLoader


  • public final class JsonContentLoader
    extends Object
    Imports JSON data and binary data into Sling resource hierarchy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.wcm.tooling.commons.contentpackagebuilder.element.ContentElement load​(File jsonFile)
      Load a JSON file and transform the contained data structured in nested maps, as supported by the ContentPackageBuilder.
      io.wcm.tooling.commons.contentpackagebuilder.element.ContentElement load​(InputStream inputStream)
      Loads a JSON content and transform the contained data structured in nested maps, as supported by the ContentPackageBuilder.
    • Constructor Detail

      • JsonContentLoader

        public JsonContentLoader()
    • Method Detail

      • load

        public io.wcm.tooling.commons.contentpackagebuilder.element.ContentElement load​(File jsonFile)
        Load a JSON file and transform the contained data structured in nested maps, as supported by the ContentPackageBuilder.
        Parameters:
        jsonFile - JSON file
        Returns:
        Nested map with content data
      • load

        public io.wcm.tooling.commons.contentpackagebuilder.element.ContentElement load​(InputStream inputStream)
                                                                                 throws IOException
        Loads a JSON content and transform the contained data structured in nested maps, as supported by the ContentPackageBuilder.
        Parameters:
        inputStream - JSON input stream
        Returns:
        Nested map with content data
        Throws:
        IOException - I/O exception