JSON formatter

Format JSON data in a beautiful way.

< 腳本JSON formatter的回應

提問/評論

§
發表於:2019-03-29

大整数显示 bug

JSON.parse时,如果包含15位以上的大整数,会导致最后几位显示为0,要想正确显示只能先替换成字符串,再parse。

const raw = document.body.innerText.replace(/([[:])?(\d{15,})([,}]])/g, "$1{\"type\":\"bigint\",\"display\":\"$2\"}$3");

Gerald作者
§
發表於:2019-04-03

已添加支持

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址