title: Return Marshmallow Raw data for Geoalchemy2
body: <p>I have the following SQLAlchemy model.</p>
  <pre><code>class LocationModel(db.Model, BaseModel):
      &quot;&quot;&quot;
      Location Model
      &quot;&quot;&quot;
  
      __tablename__ = 'location'
  
      geolocation = db.Column(ga.Geometry('POINT', dimension=2, srid=4326))
  
      def __init__(self, data):
          self.geolocation      = self.__format_geolocation()
  
          # variables for other functions
          self.result_quantity = data.get('result_quantity')
  
      def save_event_local(self):
          db.session.add(self)
          db.session.flush()
  
      def __format_geolocation(self):
          if self.latitude or self.longitude == None:
              return None
          else:
              return 'SRID=4326;POINT({} {})'.format(self.longitude, self.latitude)
  </code></pre>
  <p>I would like to return the raw data like so (marshmallow):</p>
  <pre><code>class LocationSchema(Schema):
      &quot;&quot;&quot;
      Location Schema
      &quot;&quot;&quot;
      geolocation = fields.Raw()
  </code></pre>
  <p>Unfortunately I get the following error:</p>
  <pre><code>TypeError: Object of type WKBElement is not JSON serializable
  </code></pre>
  <p>I am not sure why this is happening.</p>
  <p>Any idea how I can either serialize the deserialize Geoalchemy2 object or possibly just return the raw data so it can be used in the front end.</p>
  <p>Thanks,</p>