所有安全的 JSON 值都可以使用 JSON.stringify 序列化,不安全的 JSON 值有:undefined、function、symbol 和 循环引用。JSON.stringify在对象中遇到这些不安全的 JSON 值的时候会自动将其忽略,在数组中遇到则会返回 nul