fix(接口测试): 修复jsonpath精度提取问题
--bug=1025961 --user=王孝刚 【接口测试】jsonpath提取的值精度缺失(数组) https://www.tapd.cn/55049933/s/1369481
This commit is contained in:
parent
9bc880e486
commit
3dabfc81bd
|
@ -69,7 +69,7 @@ export default {
|
|||
open(objStr) {
|
||||
this.data = {};
|
||||
try {
|
||||
let stringedJSON = objStr.replace(/:\s*(?!.*\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}\+\d{2}:\d{2})\s([-+Ee0-9.]+)/g, ': "$1"');
|
||||
let stringedJSON = objStr.replace(/(?<=[:\[,])\s*(-?\d+(\.\d+)?)(?=\s*([,\]}]))/g, ': "$1"');
|
||||
let param;
|
||||
let JSONBig = require('json-bigint')({"storeAsString": true});
|
||||
// 解决精度丢失问题
|
||||
|
|
Loading…
Reference in New Issue