PHPackages                             nextagencyio/json\_import - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nextagencyio/json\_import

ActiveDrupal-module[Utility &amp; Helpers](/categories/utility)

nextagencyio/json\_import
=========================

Import Drupal model and content from JSON via admin form or drush command.

1.x-dev(6mo ago)11601GPL-2.0-or-laterPHP

Since Nov 7Pushed 6mo agoCompare

[ Source](https://github.com/nextagencyio/json_import)[ Packagist](https://packagist.org/packages/nextagencyio/json_import)[ Docs](https://github.com/nextagencyio/json_import)[ RSS](/packages/nextagencyio-json-import/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependencies (4)Versions (1)Used By (1)

JSON Import Module
==================

[](#json-import-module)

Overview
--------

[](#overview)

The JSON Import module allows you to import Drupal content types, paragraph types, and content from JSON configuration via an admin form or drush command. This module is forked from `dcloud_import` but focuses specifically on JSON-based imports without API functionality.

Features
--------

[](#features)

- Admin form interface for importing JSON configurations
- Drush command for command-line imports
- Support for content types, paragraph types, fields, and content
- Preview mode to see what would be imported
- Comprehensive validation of JSON structure

Installation
------------

[](#installation)

1. Place the module in `modules/custom/json_import`
2. Enable the module: `drush en json_import`

Usage
-----

[](#usage)

### Admin Interface

[](#admin-interface)

Navigate to **Configuration** → **Content authoring** → **JSON Content Import** (`/admin/config/content/json-import`)

The form provides:

- JSON input field with validation
- Example JSON configuration
- Preview mode option

### Drush Command

[](#drush-command)

Import from command line:

```
# Import from a JSON file
drush json_import:import /path/to/config.json

# Preview what would be imported
drush json_import:import /path/to/config.json --preview

# Using alias
drush ji:import /path/to/config.json
```

JSON Structure
--------------

[](#json-structure)

The module expects JSON with `model` and/or `content` arrays:

```
{
  "model": [
    {
      "bundle": "event",
      "description": "Content type for events",
      "label": "Event",
      "body": true,
      "fields": [
        {
          "id": "event_date",
          "label": "Event Date",
          "type": "datetime"
        }
      ]
    }
  ],
  "content": [
    {
      "id": "event1",
      "type": "node.event",
      "values": {
        "title": "Sample Event",
        "event_date": "2024-03-15T09:00:00"
      }
    }
  ]
}
```

Permissions
-----------

[](#permissions)

- **Import JSON Configuration**: Required to use both the admin form and drush command

Requirements
------------

[](#requirements)

- Drupal 10 or 11
- Paragraphs module (for paragraph type imports)

Technical Details
-----------------

[](#technical-details)

### Services

[](#services)

- `json_import.importer`: Main import service
- `json_import.field_type_mapper`: Maps field types
- `json_import.commands`: Drush command service

### Key Classes

[](#key-classes)

- `JsonImportForm`: Admin form
- `JsonImportCommands`: Drush commands
- `DrupalContentImporter`: Core import logic

### File Structure

[](#file-structure)

```
json_import/
├── json_import.info.yml
├── json_import.permissions.yml
├── json_import.routing.yml
├── json_import.services.yml
├── json_import.links.menu.yml
├── src/
│   ├── Commands/
│   │   └── JsonImportCommands.php
│   ├── Form/
│   │   └── JsonImportForm.php
│   └── Service/
│       ├── DrupalContentImporter.php
│       ├── FieldTypeMapper.php
│       └── FileValidationService.php
└── resources/
    └── sample.json

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance67

Regular maintenance activity

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/23e37b1ecb5973dbb1a3b1be781229da7602aee47963477ba49fcc353e3e04eb?d=identicon)[drupalninja](/maintainers/drupalninja)

---

Top Contributors

[![nextagencyio](https://avatars.githubusercontent.com/u/1112449?v=4)](https://github.com/nextagencyio "nextagencyio (6 commits)")[![jcallicott-mmgy](https://avatars.githubusercontent.com/u/242038171?v=4)](https://github.com/jcallicott-mmgy "jcallicott-mmgy (1 commits)")

### Embed Badge

![Health badge](/badges/nextagencyio-json-import/health.svg)

```
[![Health](https://phpackages.com/badges/nextagencyio-json-import/health.svg)](https://phpackages.com/packages/nextagencyio-json-import)
```

###  Alternatives

[getdkan/dkan

DKAN Open Data Catalog

385135.4k2](/packages/getdkan-dkan)[droptica/droopler

Droopler - SEO Friendly CMS &amp; Site Builder - is a Drupal-based website builder that helps you create beautiful, fast, and easy-to-manage websites

6543.1k1](/packages/droptica-droopler)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
