Json

New in version 12.3

The TCA field type json has been added to TYPO3 Core.

When using the json type, TYPO3 takes care of generating the according database field. A developer does not need to define this field in an extension's ext_tables.sql file.

Example: Simple JSON field

The system extension typo3/cms-webhooks uses a TCA field of type JSON for the input of additional HTTP request header data:

The additional header field with some example input
EXT:webhooks/Configuration/TCA/sys_webhook.php
[
    'columns' => [
        'additional_headers' => [
            'label' => 'LLL:EXT:webhooks/Resources/Private/Language/locallang_db.xlf:sys_webhook.additional_headers',
            'description' => 'LLL:EXT:webhooks/Resources/Private/Language/locallang_db.xlf:sys_webhook.additional_headers.description',
            'config' => [
                'type' => 'json',
            ],
        ],
    ],
]
Copied!