         return request
     }
     
-    // MARK: - Response Parsing
+    // MARK: - Response Validation
     
     // The API private methods separate the JSON validation and HTTP requests from Core Data caching.
     

        return resource!
    }
    
    private func setJSONObject(JSONObject: [String: AnyObject], forManagedObject managedObject: NSManagedObject, context: NSManagedObjectContext) -> ErrorType? {
        
        // set values...
        

        }
        catch StoreError.ErrorStatusCode(ErrorStatusCode.NotFound) {
            
            try self.privateQueueManagedObjectContext.performErrorBlock({ () -> Void in
                
                let objectID = try self.findEntity(entity, withResourceID: resourceID, context: self.privateQueueManagedObjectContext)
                
                if objectID != nil {
                    
                    self.privateQueueManagedObjectContext.deleteObject(self.privateQueueManagedObjectContext.objectWithID(objectID!))
                    
                    try self.privateQueueManagedObjectContext.save()
                }
            })
            
            throw StoreError.ErrorStatusCode(ErrorStatusCode.NotFound)
        }
        
        // cache recieved object...
        var managedObject: NSManagedObject!
        
        try self.privateQueueManagedObjectContext.performErrorBlock({ () -> Void in
            
            // get cached resource
            managedObject = try self.findOrCreateEntity(entity, withResourceID: resourceID, context: self.privateQueueManagedObjectContext)
            
            // set values
            try self.setJSONObject(jsonObject, forManagedObject: managedObject!, context: self.privateQueueManagedObjectContext)
            
            // set date cached
            self.didCacheManagedObject(managedObject)
            
            try self.privateQueueManagedObjectContext.save()
        })
        
        // get the corresponding managed object that belongs to the main queue context
        var mainContextManagedObject: NSManagedObject!
        
        self.managedObjectContext.performBlockAndWait({ () -> Void in
            
            mainContextManagedObject = self.managedObjectContext.objectWithID(managedObject!.objectID)
        })
        
        return mainContextManagedObject as! T
    }
    
    // MARK: - Cache
    
    private func didCacheManagedObject(managedObject: NSManagedObject) {
        
