(ErrorMessages.ERROR_TRANSLATE_JSON_RESPONSE)
in
YandexTranslate.RequestTranslation(...) is caused by an exception thrown by JSON, so outside your direct area of control. I have checked the Yandex-JSON-API responses to the three small examples from my post above via Web-Browser (Firefox 31) and got the following results:
So at least when called manually in a Web-Browser the responses to all three examples look syntactically equal, i. e. no obvious reason why two of these translations end up in AI2 with the above JSON parser exception leading to the 2203-error message, while the third does not:
{"code":200,"lang":"de-en","text":["Ladies and gentlemen"]}
{"code":200,"lang":"de-en","text":["dear gentlemen"]}
{"code":200,"lang":"de-en","text":["Mens honored"]}
Is it possible for you for debugging reasons to include the result of a call to
je.getCause() to the AI2 error message in the
catch (JSONException je) {form.dispatchErrorOccurredEvent(YandexTranslate.this, "RequestTranslation",
ErrorMessages.ERROR_TRANSLATE_JSON_RESPONSE);
} branch of your code to hopefully see what the JSON parser stumbles upon on the first two of the above examples?
Thank you very much in advance!
Sven