简体   繁体   English

BlackBerry浏览器中的JSON解析功能

[英]JSON parsing functions in BlackBerry browser

If I have a web page with some Javascript code that calls the JSON parsing functions (JSON.parse and JSON.stringify), will it work in the BlackBerry browser without the help of any 3rd-party libraries? 如果我有一个带有一些调用JSON解析函数(JSON.parse和JSON.stringify)的Javascript代码的网页,它是否可以在没有任何第三方库帮助的情况下在BlackBerry浏览器中运行? Which versions support those functions? 哪些版本支持这些功能?

I looked on Google, Stack Overflow, Can I Use, and QuirksMode.org and I couldn't find anything useful about this. 我查看了Google,Stack Overflow,Can Can Use和QuirksMode.org,我找不到任何有用的信息。

If you are dead-sure that your JSON is clean and non-dangerous, just use eval() . 如果您确定您的JSON是干净且无危险的,请使用eval()

If you must parse it and your target OS version does not include JSON support (for example, the OS 6 browser does not), then you will have to resort to a third-party library. 如果您必须解析它并且您的目标操作系统版本不包含JSON支持(例如,OS 6浏览器不支持),那么您将不得不求助于第三方库。

I've been successfully using Douglas Crockford's json2.js . 我已成功使用Douglas Crockford的json2.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM