String responseContent = getContent(response);
JSONObject responseJson = (JSONObject)JSONValue.parse(responseContent);
if((Boolean) responseJson.get("liked")){
return new RestLike(existingRestActivity.getId(), null);
} else {
throw new ServiceException(ActivityServiceImplV1Alpha2.class, "invalid response", null);
}
} catch (SocialHttpClientException e) {
throw new ServiceException(ActivityServiceImplV1Alpha2.class, "invalid response", null);
}
}