Skip to content

feat(api): dont convert array response to object by default #2230

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

lubber-de
Copy link
Member

Description

It seems a more common case people are sending JSON array instead of JSON objects for their api response.
We already supported that since 2.7.0 #294 by the rawResponse setting, but people have to actively enable it.

This PR changes the default value so json arrays are not converted to objects anymore by default.

I am still against always forcing json arrays no to be converted, because it is a valid conversion by $.extend and probably still needed for some projects.

Closes

#2220

@lubber-de lubber-de added type/feat Any feature requests or improvements lang/javascript Anything involving JavaScript state/awaiting-reviews Pull requests which are waiting for reviews tag/breaking-change Any pull request which is waiting for a breaking change release labels Feb 10, 2022
@lubber-de lubber-de added this to the 2.9.0 milestone Feb 10, 2022
@lubber-de
Copy link
Member Author

Docs added by fomantic/Fomantic-UI-Docs#329

@lubber-de lubber-de added the state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo label Feb 10, 2022
Copy link
Contributor

@exoego exoego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lubber-de lubber-de merged commit a0ba6f1 into fomantic:develop Feb 10, 2022
@lubber-de lubber-de deleted the api/dontConvertArrayResponseByDefault branch February 10, 2022 17:02
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo tag/breaking-change Any pull request which is waiting for a breaking change release type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants