how to read multipart/form-data in flask
You are sending form data as key value pairs Try this:
import json
ex = json.loads(request.form.get('ex'))
print ex
You can use request.form.to_dict() to get result into dictionary form.
Or you can use something like this:
from werkzeug.datastructures import ImmutableMultiDict
data = dict(request.form)
print data