Parsing the post json body and assigning it to variables.