From bug 47431 comment #17:
If we do decide to not include a pure-PHP [JSON] implementation, I will have to make
two small changes to the installer, though that shouldn't be a big deal at
(a) Adding a new environmental check for json_encode() or json_decode()
(b) Removing one of the two uses of Xml::encodeJsVar. This is for JS encoding
an array of database types that doesn't seem to be used anywhere, and which
any case should be alphanumeric (thus simple to encode).