Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[HttpFoundation] Update DEFAULT_ENCODING_OPTIONS constant in JsonResponse following serializer updates #51409

Copy link
Copy link
Closed
@JorgeHRJ

Description

@JorgeHRJ
Issue body actions

Description

In this PR #45554 (related to this issue #47183) was added the flag JSON_PRESERVE_ZERO_FRACTION as default in the JsonEncode default context. This is great, but in my opinion the DEFAULT_ENCODING_OPTIONS constant in class JsonResponse should be following this update and have the JSON_PRESERVE_ZERO_FRACTION flag in it.

At the moment the DEFAULT_ENCODING_OPTIONS value is 15 (which equals to JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT). I suggest update it to 1039 (which equals to JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_PRESERVE_ZERO_FRACTION.

Is this change worth it? Do you think it would be OK if I make a PR for this?

Kind regards

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.