How do I return a json object of my database table
So with a bit of hunting and adapting, i resolved the issue with a different method.  I'll post it here incase someone else has an issue similar to this in the future.

The completed route in the server to get the json working correctly is

@testRestServer.route("/dbMap", methods=['GET', 'POST'])
def getData():

cursor.execute('''SELECT * FROM locations ''')
row_headers = [x[0] for x in cursor.description]  # this will extract row headers
rv = cursor.fetchall()
json_data = []
for result in rv:
    json_data.append(dict(zip(row_headers, result)))
return json.dumps(json_data)