This can be removed. If you're on PHP < 5.4, the `JsonSerializable` class gets automatically loaded into the global namespace when include `joomla/compat` in your composer.json.