Fix bug in the ParseData funtion in order to parse JSON form POST or PUT