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");
已添加支持
답글을 게시하려면 로그인하세요.
大整数显示 bug
JSON.parse时,如果包含15位以上的大整数,会导致最后几位显示为0,要想正确显示只能先替换成字符串,再parse。
const raw = document.body.innerText.replace(/([[:])?(\d{15,})([,}]])/g, "$1{\"type\":\"bigint\",\"display\":\"$2\"}$3");