用户工具

站点工具


toJSON

const json = JSON.stringify({
  answer: { toJSON: () => 42 }
});

console.log(json); // {"answer":42}
/opt/bitnami/dokuwiki/data/pages/javascript/tojson.txt · 最后更改: 2020/12/31 01:06 由 superuser