diff -u b/core/modules/layout_builder/src/Section.php b/core/modules/layout_builder/src/Section.php --- b/core/modules/layout_builder/src/Section.php +++ b/core/modules/layout_builder/src/Section.php @@ -16,7 +16,7 @@ * @see \Drupal\Core\Layout\LayoutDefinition * @see \Drupal\layout_builder\SectionComponent */ -class Section implements ThirdPartySettingsInterface { +class Section implements ThirdPartySettingsInterface, \JsonSerializable { /** * The layout plugin ID. @@ -441,2 +441,11 @@ + /** + * Returns a representation of the section for use in JSON serialization. + * + * @return array + */ + public function jsonSerialize() { + return $this->toArray(); + } + }