Fix bug for older PHP versions: check if json_encode is valid by result from json_last_error()
Fix bug for older PHP versions: check if json_encode is valid by result from json_last_error()

vgarvardt/JsonRPC,fguillot/JsonRPC