什么 JSON 解析库适合 Google NaCl (c++)?

发布于 2024-12-23 18:35:36 字数 419 浏览 4 评论 0原文

由于 NaCl 在浏览器和模块之间使用消息传递系统,我认为将对象序列化到 JSON 或从 JSON 序列化对象将是与 javascript 通信的好方法。我正在使用这个库:http://code.google.com/p/pjson/因为它是我发现的唯一一个可以与 Pepper15 一起编译的版本。

它似乎可以工作,但是对于非常大的消息(> 20K),它似乎会崩溃。我正在尝试将 NaCl 用于 WebGL 项目,该项目不会在 NaCl 中完成实际的 opengl,我只想进行顶点处理。这最终导致大量数据来回传递。我不认为这是对 NaCl/Pepper postMessage 方法的限制。

还有其他人在 NaCl 中使用 JSON 可能有更好的库或一些见解吗?

Since NaCl uses a messaging system between the browser and the module I thought that serializing objects to / from JSON would be a good way to communicate with the javascript. I am using this library: http://code.google.com/p/pjson/ because it was the only one that I found that I could get to compile along with Pepper15.

It seems to work, however with really large messages (>20K) it seems to crash. I'm trying to use NaCl for a WebGL project which won't have the actual opengl being done in NaCl, I just wanted to do the vertex processing. This ends up having huge amounts of data passed back and forth. I don't think it's a limit on the NaCl/Pepper postMessage method.

Anyone else using JSON in NaCl that might have a better library or some insight?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

私野 2024-12-30 18:35:36

NaCl 端口 包含 jsoncpp 库。

NaCl ports contains a port of jsoncpp library.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文