Closed (outdated)
Project:
Drupal core
Version:
main
Component:
serialization.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Nov 2018 at 01:59 UTC
Updated:
17 Jun 2026 at 13:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lawxen commentedMy reproduced steps:
Ouput:
Comment #3
lawxen commentedSimilar issue with TypedData 'Any' can't be normalized to array if it stores an object
When enable "Allow each content item to have its layout customized" on article
Layout builder add a bundle field "layout_builder__layout" to article.
The layout_section field type definition here: \Drupal\layout_builder\Plugin\Field\FieldType\LayoutSectionItem
We can see it use layout_section typed data \Drupal\layout_builder\Plugin\DataType\SectionData
Field layout_builder__layout store object value, see below image:
But this typed data "layout_section" can't be normalized if it stores an object.
Comment #4
lawxen commentedAfter add some code like anyNormalizer to TypedDataNormalizer
The jsonapi return :
Comment #5
lawxen commentedComment #6
lawxen commentedComment #7
tim.plunkett#2942975: [PP-1] Expose Layout Builder data to REST and JSON:API
Comment #18
smustgrave commentedThis came up as the daily BSI target
I tried following the steps but I'm not seeing the error. Can you verify if you are seeing it in D11 still? If not we can close out
If still a bug please move back to Active and update the summary.
Thanks.
Comment #19
smustgrave commentedSince there's been no follow up and can't reproduce going to close out. If still an issue please re-open maybe updating summary with clearer steps?