Open DonutEspresso opened 6 years ago
Is that really a regression, it seems that the erroneous behavior may have been present for a while. For instance, the commit at https://github.com/restify/clients/commit/fb52f481adf8e7be9cd7c8249cb99e2547c88bf4#diff-1f5c7c63b7ce8433f5b0480296a5f265R57 uses:
obj = obj || {};
to set the response object. Wouldn't that have the same problem? If so, that commit was merged ~2015, wouldn't that make this PR semver major?
@misterdjules You're right - I confused this with restify's ability to send these values as strings (but not for restify-client's ability to parse those strings as valid JSON).
I guess this is indeed semver major.
As part of revving dependencies, I discovered a regression in JSONClient. I'm not sure when it happened, it looks like the tests were not even checking for the right thing.
Essentially, if the server sends 0, null, or false, that is valid JSON and the client should respect it. This is similar to restify/node-restify#1609.