Views: REST export

Created on 13 September 2024, 6 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 about 4 hours ago

Created by

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

Comments & Activities

  • Issue created by @mshsmk
  • This has steps to reproduce like a bug but it is a support request. Is it mis-categorized?

  • πŸ‡³πŸ‡±Netherlands Lendude Amsterdam

    Does it also serialize booleans as strings when you don't rewrite to 0/1? With the rewrite would you expect an integer and not a boolean or a string?

  • Status changed to Postponed: needs info 19 days ago
  • πŸ‡³πŸ‡ΏNew Zealand quietone

    Maybe this is a but but I tried to reproduce this, with the steps in the issue summary and wasn't able to. Are there steps missing?

Production build 0.71.5 2024