12. Security Considerations (安全考虑)
Generally, there are security issues with scripting languages. JSON is a subset of JavaScript but excludes assignment and invocation.
通常,脚本语言存在安全问题。JSON是JavaScript的子集,但排除了赋值和调用。
Since JSON's syntax is borrowed from JavaScript, it is possible to use that language's "eval()" function to parse JSON texts. This generally constitutes an unacceptable security risk, since the text could contain executable code along with data declarations. The same consideration applies to the use of eval()-like functions in any other programming language in which JSON texts conform to that language's syntax.
由于JSON的语法借鉴自JavaScript,因此可以使用该语言的"eval()"函数来解析JSON文本。这通常构成不可接受的安全风险,因为文本可能包含可执行代码以及数据声明。同样的考虑适用于在JSON文本符合该语言语法的任何其他编程语言中使用类似eval()的函数。