title: Removing/Escaping single quotes MySQL/JSON
body: <p>I'm not quite sure which I need to do - deal with the single quotes on the MySQL side of things (on import or export) or deal with them on the JSON dump. </p>
  
  <p>I have a function that SELECTS the 4 DB columns and returns them.</p>
  
  <pre><code>def Import_Sql():
      c, conn = connection()
      dictCursor = conn.cursor(MySQLdb.cursors.DictCursor)
      data = dictCursor.execute("SELECT title, description, lat, lng FROM poi")
      data = dictCursor.fetchall()
      dictCursor.close
      c.close()
      gc.collect()
  
      return data
  </code></pre>
  
  <p>From there I do <code>jsonout = json.dumps(data)</code> which returns the following JSON </p>
  
  <pre><code>[{"lat": "43.8934276", "lng": "-103.3690243", "description": "Super Amazing Place", "title": "Swimming"}]
  </code></pre>
  
  <p>That all works without a flaw, however, if someone adds a DB entry that contains single quotes in the text (for example if above said "It's super amazing") I run into an issue with my Google Map no longer being able to add a marker to the point because my JSON becomes invalid. </p>
  
  <p>If someone could describe to me where the issue lays, and what I can do to remedy it, I would be super happy! Thanks in advance.</p>