Import Content into JCR from JSON or CSV file icon
Module Id
importContentFromJson
Group Id
org.jahia.se.modules
Updated
Requires Jahia
8.1.7.2
Author
Stephane Monier
Category
Tools and Utilities
Status
COMMUNITY info

Import Content into JCR from JSON or CSV file group_work

import jcr json csv migration

Import Content from JSON or CSV

Import Content from JSON or CSV is a Jahia module that enables bulk content creation in the Jahia JCR repository directly from structured data files.

The module simplifies large-scale content onboarding by allowing editors or developers to map fields from JSON or CSV files to the properties of a selected Jahia content type. It automatically creates the corresponding nodes in the repository, including associated assets such as images.

This tool is particularly useful for:

  • Migrating content from external systems

  • Importing datasets into Jahia

  • Automating content creation for large catalogs or articles

  • Rapidly populating new sites during development or onboarding

 

Key Features

  • Import content from JSON or CSV files

  • Automatic mapping of file fields to JCR properties

  • Supports multiple content items in a single import

  • Handles media imports (images via URL)

  • Supports multi-valued fields such as tags or image lists

  • Simple UI integrated directly into jContent

 

Usage

The module is accessible from the Jahia Content Editor (jContent) interface.

  1. Open jContent → Content Tools

  2. Select the target content path

  3. Choose the content type to create

  4. Upload a JSON or CSV file

  5. Launch the import

The module will automatically create the corresponding content nodes under the selected path.

 

JSON Structure

Each entry in the JSON file represents one content item.

Property names must match the property names of the selected content type.

 

Example:

[
  {
    "jcr:title": "Artificial Intelligence for Public Procurement",
    "teaser": "Discover how AI transforms procurement processes by improving efficiency and decision making.",
    "date": "2024-11-01",
    "image": {
      "url": "https://picsum.photos/800/600?random=1"
    },
    "images": [
      { "url": "https://picsum.photos/1600/800?random=1" },
      { "url": "https://picsum.photos/1600/800?random=2" }
    ],
    "j:tagList": [
      "AI",
      "Automation",
      "Transparency",
      "Public Procurement"
    ]
  }
]

 

 

Typical Use Cases

  • Content migration from legacy CMS

  • Importing product catalogs or article collections

  • Seeding demo environments

  • Automating content generation workflows

Dependencies & Dependants

Dependencies
  • NONE
Dependants
  • NONE

FAQ

FAQ

 

What type of files can I import?

The module supports importing content from:

  • JSON files

  • CSV files (with field mapping)

Each entry in the file represents a content item that will be created in the Jahia repository.

 


Do the field names need to match the content type properties?

Yes.

The property names in the JSON or CSV file must match the property names of the selected Jahia content type.

Example:

{
  "jcr:title": "My Article",
  "teaser": "Short description",
  "date": "2024-11-01"
}

If a property does not exist in the content type, it will be ignored.

 


Can I import multiple content items at once?

Yes.

You can import multiple content items in a single file. Each object in the JSON array will create one content node.

Example:

[
  {"jcr:title": "Article 1"},
  {"jcr:title": "Article 2"},
  {"jcr:title": "Article 3"}
]

 


Can the module import images?

Yes.

Images can be imported using a URL reference.

Example:

{
  "image": {
    "url": "https://example.com/image.jpg"
  }
}

The module will download the image and create the corresponding asset in the Jahia repository.

 


Are multi-valued fields supported?

Yes.

You can import multi-valued properties such as tags or image lists using arrays.

Example:

{
  "j:tagList": ["AI", "Automation", "Innovation"]
}

 


Where are the imported nodes created?

All content is created under the base path you select before starting the import in the module UI.

 


What happens if a property is missing?

If a property is missing from the JSON or CSV file:

  • The property will simply remain empty

  • The node will still be created

However, mandatory properties defined in the content type must be present.

 


What happens if the JSON structure is invalid?

The import will fail.

Make sure your file:

  • Is valid JSON

  • Contains a JSON array

  • Uses valid property names

You can validate your JSON with tools such as:

  • https://jsonlint.com

 


Can I use this module for content migration?

Yes.

The module is well suited for:

  • Migrating content from external systems

  • Importing datasets

  • Bulk creating content for catalogs, articles, or news

  • Seeding demo environments

 


Is the module safe to use in production?

Yes, but it is recommended to:

  • Test imports in a staging environment first

  • Validate the JSON structure before importing

  • Import small batches when working with large datasets

 

How To Install

Installation

The ImportContentFromJson module can be installed like any standard Jahia module.

 

Prerequisites

  • Jahia 8.x or later

  • Access to the Jahia Administration / Modules interface

  • Permissions to deploy modules on the platform

 


Option 1 — Install from Jahia Store (Recommended)

  1. Open Jahia Administration

  2. Navigate to Modules → Jahia Store

  3. Search for Import Content from JSON or CSV

  4. Click Install

  5. Wait for the module to deploy automatically

Once installed, the module will be available inside jContent.

 


Option 2 — Install from a JAR file

  1. Download the module .jar from the repository releases.

  2. Go to Jahia Administration → Modules

  3. Click Install module

  4. Upload the .jar file.

  5. Activate the module once it appears in the module list.

 


Option 3 — Install for Development

If you want to build and deploy the module locally:

git clone https://github.com/smonier/importContentFromJson.git
cd importContentFromJson
mvn clean install

The generated module will be available in:

target/importContentFromJson-*.jar

Deploy it in Jahia by copying it into:

$JAHIA_HOME/digital-factory-data/modules

Then restart Jahia or install it via the Modules administration interface.

 


Verify Installation

After installation:

  1. Open jContent

  2. Click Content Tools

  3. Select Import Content From JSON

 

You should now see the import interface where you can upload a JSON or CSV file and create content automatically.

Images

License

MIT License

Copyright (c) 2024 Jahia Forge - Code Repository

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.