Contact Us
Free Trial
Secure Video Conferencing LiveSwitch Cloud
Secure Video Conferencing LiveSwitch Cloud

PHP's json_encode Has Weird Forward Slash Escaping

by Frozen Mountain Software, on December 12, 2009

OK, we've just uploaded a new version of our PHP publisher and proxy.

We are using the built in json_encode function of PHP (new in version 5.2.1+) to create our JSON strings, and it turns out that there's a bug, or at least a pseudo-bug, in how the json_encode function is implemented. For some reason, they escape forward slashes in the output. This is rather odd, and was the underlying issue that could eventually result in an "invalid json" complaint in our javascript client.

It appears that this issue may be resolved in PHP 5.3+, so those of you running the latest version may not have seen any issues. In either case, the updated scripts should work.

Anyhow, for those of you using WebSync with PHP, grab a new copy of the PHP libraries from our downloads section and you'll be good to go.

Special thanks to Andrew Betts for finding and reporting this one to us.

Frozen Mountain Software

Started in 2008 and having grown to over 300 customers in 47 countries worldwide, Frozen Mountain provides cross-platform, licensed Real Time Communication (RTC) SDKs and RTC services that allow your organization to incorporate WebRTC audio/video streaming and mixing, selective forwarding, call signalling and much more into your applications.