Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Serializer] enable JSON_PRESERVE_ZERO_FRACTION by default#47202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:6.2fromdbu:patch-4
Aug 7, 2022

Conversation

@dbu
Copy link
Contributor

@dbudbu commentedAug 5, 2022

this makes json output float values that happen to be full numbers with a.0, so4.0 or0.0 instead of4 resp0. that in turn helps when consuming the json in a type-safe language.

QA
Branch?6.2
Bug fix?no
New feature?no
Deprecations?no
TicketsAs discussed in#47183
LicenseMIT
Doc PR-

In#47183,@nicolas-grekas said that we should enable the preserve zero fraction flag by default in the serializer.

I am a bit unsure if we should consider this a BC break, as it does change the output of JSON data. Should it be considered a bugfix against 6.1, a feature against 6.2 or a BC break that has to wait until 7.0?

this makes json output float values that happen to be full numbers with a `.0`, so `4.0` or `0.0` instead of `4` resp `0`. that in turn helps when consuming the json in a type-safe language.
@dbudbu requested a review fromdunglas as acode ownerAugust 5, 2022 13:02
@carsonbotcarsonbot added this to the6.2 milestoneAug 5, 2022
@carsonbotcarsonbot changed the titleenable JSON_PRESERVE_ZERO_FRACTION by default[Serializer] enable JSON_PRESERVE_ZERO_FRACTION by defaultAug 7, 2022
@fabpot
Copy link
Member

Thank you@dbu.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@dunglasdunglasdunglas approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

5 participants

@dbu@fabpot@dunglas@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp