     console.log "Generating completion handler"
     completionHandler = initCompletionHandler task, callback
 
+    try
+      task.request.body = JSON.parse task.request.body
+    catch e
+
     console.log "Checking dataop"
     if task.method is 'POST'
       console.log "DataOp is insert"

    return registeredCollections[collectionName]

  initCompletionHandler = (task, callback) ->
    unless task.originalRequest?
      task.originalRequest = task.request

    environmentId = task.appMetadata._id


        unless result.statusCode?
          result.statusCode = 200
        console.log "About to parse entity(s)"
        result.body = JSON.stringify entity
        #if result.statusCode < 400 and entityParser.isKinveyEntity(entity) is false

          #if entity.constructor isnt Array
          #  entity = entityParser.entity entity


        result.continue = true

