Support for PHP<5.4

As well in legacy JSON