Views REST export serializes booleans as strings

Created on 13 September 2024, 4 months ago
Updated 19 September 2024, 4 months ago

Problem/Motivation

Boolean values in views fields exported as string when REST export display is created in views.

Assumption: ViewsRenderPipelineMarkup uses trait MarkupTrait that converts everything to a string.

Steps to reproduce

1. Add Boolean field to any Content Type
2. Create a views to display Content Type fields from step #1 with display REST export
3. Add a boolean field to be displayed in views
4. Set formatter to show boolean 1/0
5. Check the resulted JSON: boolean value is formatted as a string

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ’¬ Support request
Status

Active

Version

10.3 ✨

Component
ViewsΒ  β†’

Last updated 30 minutes ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024