阅读背景:

为什么JavaScript对象没有toJSON()方法?

来源:互联网 

As described at https://www.json.org/js.html, JavaScript objects can dictate how they are serialized by JSON.stringify() by implementing a toJSON() method. For an arbitrary object, this method is not defined, while numbers and strings seem to implement the method. I'm curious--why do objects not have an implementation?, J




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: