Skip to content

Commit a0ba6f1

Browse files
authored
feat(api): dont convert array response to object by default
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.
1 parent 375d141 commit a0ba6f1

File tree

1 file changed

+1
-1
lines changed
  • src/definitions/behaviors

1 file changed

+1
-1
lines changed

src/definitions/behaviors/api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ $.api.settings = {
11101110
responseAsync : false,
11111111

11121112
// whether onResponse should work with response value without force converting into an object
1113-
rawResponse : false,
1113+
rawResponse : true,
11141114

11151115
// callbacks before request
11161116
beforeSend : function(settings) { return settings; },

0 commit comments

Comments
 (0)