Removed JSON_PRETTY_PRINT as it only works with PHP 5.4 or later.