This repository was archived by the owner on Jun 11, 2019. It is now read-only.

Description
A valid response from BrightCove after executing "updateVideo" as an example:
{
"result": {
"id": ANY_NUMBER,
"name": "video name",
"adKeys": null,
"shortDescription": "video description",
"longDescription": "video long description",
"creationDate": "1450813675021",
"publishedDate": "1450813675021",
"lastModifiedDate": "1450813675056",
"linkURL": null,
"linkText": null,
"tags": [
"tag1",
"tag2"
],
"videoStillURL": null,
"thumbnailURL": null,
"referenceId": null,
"length": 0,
"economics": "AD_SUPPORTED",
"playsTotal": null,
"playsTrailingWeek": null
},
"error": null,
"id": null
}
the code part in the class WriteApi should be changed from
Video result = null;
if(response.getString("result") != null) {
String jsonResult = response.getString("result");
result = new Video(jsonResult);
}
to
Video result = null;
if (response.has("result")
&& response.getJSONObject("result") != null) {
JSONObject jsonResult = response.getJSONObject("result");
result = new Video(jsonResult);
}