-
Notifications
You must be signed in to change notification settings - Fork 3
Description
sofa.Util.toJson still handles stupid backend response. Despite from the fact that the backend should be fixed accordingly, it also introduces a side effect as you can see in line 348 https://github.com/sofa/sofa-core/blob/master/src/sofa.util.js#L357-L371.
Any updates on the backend handling?
We should make the toJson method behave like one would expect when using a toJson method. Therefore I would recommend either introducing a separate method that uses toJson and adds the side effect, or introducing a parameter to control wether we want toJson behave like ass or not.
@cburgdorf @nickjanssen thoughts anyone?
Background is that I need this method in sofa.HttpService. Of course, the places where our http service is used only calls our backend, which means calling the current toJson on top of that with the side effect would actually be the right thing.
But to do things "right" we should expect that one can use the http service for other endpoints too!