Hi again and sorry for spamming :)
I'm using PHP 5.4.12 and the encode method returns null because the $depth parameter is not recognized in this PHP version. Also the decode method could be problematic for PHP 5.3 users because the $options parameter was added in 5.4.
Or are you just supporting PHP 5.5+ ? Because in your composer.json you are explicitly supporting PHP from 5.3 upwards.
Thanks in advance for a reply.