---
title: "Feature: #101404 - Extbase maps JSON fields to array properties"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-101404-1795708000"
source: "Changelog/15.0/Feature-101404-ExtbaseMapsJsonFieldsToArrayProperties.rst"
typo3-version: "15.0"
typo3-major: 15
type: "feature"
issue: 101404
forge: "https://forge.typo3.org/issues/101404"
tags: ["PHP-API", "ext:extbase"]
rendered: "2026-12-04T23:52:36+00:00"
---

# Feature: #101404 - Extbase maps JSON fields to array properties {#feature-101404-1795708000}

See [forge#101404](https://forge.typo3.org/issues/101404)

## Description {#description}

Extbase now maps database columns configured as TCA type
`json` to domain model properties typed as `array` or
`?array`. The JSON stored in the database is decoded into a PHP array
when the entity is reconstituted and an array is encoded as JSON when the
entity is persisted.

**EXT:my_extension/Classes/Domain/Model/Product.php**

```php
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;

class Product extends AbstractEntity
{
    protected array $attributes = [];
    protected ?array $metadata = null;

    // getters and setters
}
```

**EXT:my_extension/Configuration/TCA/tx_myextension_domain_model_product.php**

```php
return [
    'columns' => [
        'attributes' => [
            'config' => [
                'type' => 'json',
                'default' => '[]',
            ],
        ],
        'metadata' => [
            'config' => [
                'type' => 'json',
            ],
        ],
    ],
];
```

An empty database value and JSON that does not decode to an array leave a
non-nullable property at its default value and set a nullable property to
`null`. A nullable property set to `null` is stored as
`NULL`.

JSON objects are decoded into associative arrays, so an empty object
`{}` is written back as `[]` on the next persist.

## Impact {#impact}

Array properties of Extbase domain models can be used with TCA type
`json` columns without a custom `TypeInterface` value object.
Mapping such properties from request arguments (property mapping) and query
constraints on JSON columns are not part of this feature.

Array properties that map to other column types are still not populated
from the database.
