fix(#2767): Fix serilization issues of bigint in json body
Fixes: #2767
Test Results
1 files ±0 59 suites +1 21s :stopwatch: -1s 84 tests ±0 84 :white_check_mark: ±0 0 :zzz: ±0 0 :x: ±0 131 runs +1 131 :white_check_mark: +1 0 :zzz: ±0 0 :x: ±0
Results for commit 00e98451. ± Comparison against base commit b4fd3503.
:recycle: This comment has been updated with latest results.
The serialization is now lossless. Just need to fix the deserialization next by providing a toggle at collection level setting to disable parsing response as json (when the content type is application/json)
@Its-treason I have addressed all your comments and have also made some updates. Let me know if you have further comments
@lohxt1 will take over from here and add further changes on this PR to add a toggle in bruno.json to support disabling the behaviour of bruno automatically parsing response as json (if the response is a valid json). This is aimed at solving the problem around the response text losing its fidelity during the JSON.parse operation
bruno.json
{
parseResponseJson: true
}
Another option that I am thinking to solve problems for folks who don’t want us to to automatically parse response as json (where the response loses fidelity in some cases) is to provide an api that can disable this.
req.disableParsingResponseJson()
They can use this then at request level scripting, or apply it to folder level or collection level scripts as they see fit.
We can consider providing a UI toggle much later if there is demand for it.
The PR is GTG from my side.
Folks who don’t want us to to automatically parse response as json (where the response text loses fidelity in some cases) can use the new api method req.disableParsingResponseJson()
They can use this at request level scripting, or apply it to folder level or collection level scripts as they see fit.
@Its-treason @jwetzell let me know if you have any further comments. I plan to have this merged tomorrow.
hello, fix seems not working in 1.27.0
eg { "id": 1.0000000000000493e+21, "dateFrom": "2019-08-08", }