should this be special cased, because since php 5.5 this is available builtin?
http://php.net/json_last_error_msg

not important though.