PHPackages                             unclecheese/silverstripe-serialised-dbfields - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. unclecheese/silverstripe-serialised-dbfields

ActiveSilverstripe-module[Parsing &amp; Serialization](/categories/parsing)

unclecheese/silverstripe-serialised-dbfields
============================================

Provides serialised data (YAML, JSON) in text fields that are traverseable as nested ViewableData objects.

6.x-dev(8mo ago)106.2k↓100%3[2 PRs](https://github.com/unclecheese/silverstripe-serialised-dbfields/pulls)BSD-3-ClausePHP

Since Feb 18Pushed 8mo ago2 watchersCompare

[ Source](https://github.com/unclecheese/silverstripe-serialised-dbfields)[ Packagist](https://packagist.org/packages/unclecheese/silverstripe-serialised-dbfields)[ Docs](https://github.com/unclecheese/silverstripe-serialised-dbfields)[ RSS](/packages/unclecheese-silverstripe-serialised-dbfields/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Serialised DB Fields for SilverStripe
=====================================

[](#serialised-db-fields-for-silverstripe)

Provides serialised data (YAML, JSON) in text fields that are traverseable as nested ViewableData objects.

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

[](#installation)

`composer require unclecheese/silverstripe-serialised-dbfields`

Recommended add-ons
-------------------

[](#recommended-add-ons)

If you plan on editing the serialised data in the CMS, you'll probably want to install [CodeEditorField](https://github.com/nathancox/silverstripe-codeeditorfield).

`composer require nathancox/codeeditorfield`

The database fields are set up to automatically scaffold `CodeEditorField` when available.

Usage
-----

[](#usage)

*mysite/code/MyPageType.php*

```
class MyPageType extends Page {

  private static $db = [
    'MyJSONData' => 'JSONField',
    'MyYAMLData' => 'YAMLField'
  ];

  public function getCMSFields()
  {
    $fields = parent::getCMSFields();
    $fields->addFieldToTab('Root.JSONData', CodeEditorField::create('MyJSONData')
      ->setMode('json')
    );
    $fields->addFieldToTab('Root.YAMLData', CodeEditorField::create('MyYAMLData')
      ->setMode('yaml')
    );

    return $fields;
  }
}
```

*$MyJSONData*

```
{
  "Category": "Lollies",
  "BannerImage": "/path/to/image.png",
  "Products": [
    {
      "Title": "Snake",
      "Colour": "Red"
    },
    {
      "Title": "Jet plane",
      "Colour": "Purple"
    }
  ]
}
```

*themes/mytheme/templates/Layout/MyPageType.ss*

```

  Category: $Category

  $Products.count total products

  	$Title ($Colour)

```

Casting
-------

[](#casting)

By default, all scalar values fall back on the `$default_cast` setting of `ViewableData` (Text). To customise the casting, use the `|` symbol in your field value.

```
Price: Currency|20.00
StartDate: Date|2016-01-01
```

Tests
-----

[](#tests)

`framework/sake dev/tests/SerialisedDBFeildsTest`

Troubleshooting
---------------

[](#troubleshooting)

Ring Uncle Cheese.

###  Health Score

40

—

FairBetter than 87% of packages

Maintenance63

Regular maintenance activity

Popularity29

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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

Every ~1123 days

Total

2

Last Release

255d ago

Major Versions

4.x-dev → 6.x-dev2025-08-27

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/654636?v=4)[Aaron Carlino](/maintainers/unclecheese)[@unclecheese](https://github.com/unclecheese)

---

Tags

jsonyamlsilverstripedbfield

### Embed Badge

![Health badge](/badges/unclecheese-silverstripe-serialised-dbfields/health.svg)

```
[![Health](https://phpackages.com/badges/unclecheese-silverstripe-serialised-dbfields/health.svg)](https://phpackages.com/packages/unclecheese-silverstripe-serialised-dbfields)
```

###  Alternatives

[phptek/jsontext

JSON storage, querying and modification.

2222.2k2](/packages/phptek-jsontext)[thunderer/serializard

Flexible serializer

2767.3k1](/packages/thunderer-serializard)[thewunder/conphigure

Framework Agnostic Configuration Library

3115.9k](/packages/thewunder-conphigure)[phppkg/config

Config manage, load, get. Supports INI,JSON,YAML,NEON,PHP format file

133.5k](/packages/phppkg-config)

PHPackages © 2026

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