Use Flask's Request.json for JSON parsing

Attempts to fix issue #17. But this is not a great solution because of the problems described in the comments there.