/** * Given the raw JsonNode, construct a statistics object. * @param node JsonNode * @return VideoStatistics */ private VideoStatistics buildStatistics(JsonNode node) { VideoStatistics statistics = new VideoStatistics(); JsonNode statisticsNode = node.get("statistics"); statistics.setCommentCount(statisticsNode.get("commentCount").bigIntegerValue()); statistics.setDislikeCount(statisticsNode.get("dislikeCount").bigIntegerValue()); statistics.setFavoriteCount(statisticsNode.get("favoriteCount").bigIntegerValue()); statistics.setLikeCount(statisticsNode.get("likeCount").bigIntegerValue()); statistics.setViewCount(statisticsNode.get("viewCount").bigIntegerValue()); return statistics; } }