Format JSON data in a beautiful way.
< 腳本JSON formatter的回應
大整数显示 bug
JSON.parse时,如果包含15位以上的大整数,会导致最后几位显示为0,要想正确显示只能先替换成字符串,再parse。
const raw = document.body.innerText.replace(/([[:])?(\d{15,})([,}]])/g, "$1{\"type\":\"bigint\",\"display\":\"$2\"}$3");
已添加支持
登入以回復
土豆服务器,请按需使用
镜像地址随时可能被墙,建议加群获取最新地址
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址
大整数显示 bug
JSON.parse时,如果包含15位以上的大整数,会导致最后几位显示为0,要想正确显示只能先替换成字符串,再parse。
const raw = document.body.innerText.replace(/([[:])?(\d{15,})([,}]])/g, "$1{\"type\":\"bigint\",\"display\":\"$2\"}$3");