code: public function jsonSerialize(): array
      {
          $locale = $this->sys->getLocale();
  
          $fields = new \stdClass();
          foreach ($this->fields as $name => $value) {
              $fields->$name = $locale ? $value[$locale] : $value;
          }
  
          return [
              'sys' => $this->sys,
              'fields' => $fields,
          ];
      }
docs: {@inheritdoc}