<?php

Kirby::plugin('ucomeugo/jsonField', [
  'fields' => [
    'json' => [
      // here we could define the backend logic for our field if needed
    ]
  ],
  'fieldMethods' => [
      'parseJSON' => function ($field) {
          // $field->value = json_decode($field->value);
          return json_decode($field->value, true);
      }
  ]
]);
