Yep. May be I could refactor it to use `json_last_error_msg` for php >=5.5
```php
if (function_exists('json_last_error_msg') {
     //use json_last_error_msg
} else {
   //current implementation
}
```
Do you think it could improve performance?