I have this funky code in python.
@route('lda', methods=["POST"])
def lda(self):
domain = request.json.get("domain", None)
username = request.json.get("username", None)
password = request.json.get("password", None)
server_address = request.json.get("server_address", None)
This of course is not good. How can I deserialize the request.json into an object so that I don't need to type the variables lame like that.
requestData = toObject(request.json)
and then I can use it like this:
xcv = requestData.username ...