// var a = ‘{"name": 12,"number": "123456789898988899b"}‘;
var a = ‘{"name": 12,"number": 123456789898988899}‘;
var b = a.replace(/\":\s*(\d{17,})/g,‘\":\"$1\"‘);
// var c = JSON.stringify(a);
// var c = JSON.parse(b);
时间: 2024-10-13 19:45:56