Skip to content

[Serializer] XML Context Options on how xsd:boolean are normalized/serialized #58305

Open
@Hanmac

Description

@Hanmac

Description

Right now, normalized boolean values are turned into '0' and '1' in the XMLEncoder

} elseif (\is_bool($val)) {
return $this->appendText($node, (int) $val);

but while they are valid for xsd:boolean, I might want to have them rendered differently like 'true' and 'false'

if we want to have this be changed on Attribute Level, then we might need to look at this, and make Scalar values pass through normalize

if (null === $attributeValue || \is_scalar($attributeValue)) {
$data = $this->updateData($data, $attribute, $attributeValue, $class, $format, $attributeContext, $attributesMetadata, $classMetadata);
continue;

This is also related to #58056

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions