title: Object of type 'RepeatedCompositeContainer' is not JSON serializable
body: <p>Using Google Client Library interacting with the vision library.</p>
  
  <p>I have a function to detect labels from an image.</p>
  
  <p><strong>GoogleVision.py</strong></p>
  
  <pre><code>import os
  
  from google.cloud import vision
  from google.cloud.vision import types
  from google.protobuf.json_format import MessageToJson
  
  
  class GoogleVision():
  
      def detectLabels(self, uri):
  
          client = vision.ImageAnnotatorClient()
          image = types.Image()
          image.source.image_uri = uri
  
          response = client.label_detection(image=image)
          labels = response.label_annotations
  
          return labels
  </code></pre>
  
  <p>I have an api to call this function.</p>
  
  <pre><code>from flask_restful import Resource
  from flask import request
  from flask import json
  from util.GoogleVision import GoogleVision
  
  import os
  
  
  class Vision(Resource):
  
      def get(self):
  
          return {"message": "API Working"}
  
      def post(self):
  
          googleVision = GoogleVision()
  
          req = request.get_json()
  
          url = req['url']
  
          result = googleVision.detectLabels(url)
  
          return result
  </code></pre>
  
  <p>However, it does not return the result and errors with the following</p>
  
  <blockquote>
    <p>TypeError: Object of type 'RepeatedCompositeContainer' is not JSON
    serializable</p>
  </blockquote>