     
     private enum JSONKey: String {
         
-        case EntityName
         case SortDescriptors
         case Predicate // Optional
         case FetchLimit // Optional


public extension FetchRequest {
    
    init?(JSONValue: JSON.Value, parameters: [Entity]) {
        
        let model = parameters
        
        guard let jsonObject = JSONValue.objectValue,
            let entityName = jsonObject[JSONKey.EntityName.rawValue]?.rawValue as? String,
            let sortDescriptorsJSONArray = jsonObject[JSONKey.SortDescriptors.rawValue]?.arrayValue,
            let sortDescriptors = SortDescriptor.fromJSON(sortDescriptorsJSONArray)
            else { return nil }
        
        // find entity with specified name
        
        guard let entity = {
            for entity in model { if entity.name == entityName { return entity } }
            return nil
            }() as Entity? else { return nil }
        
        self.entityName = entityName
        self.sortDescriptors = sortDescriptors
        
        if let fetchLimitJSON = jsonObject[JSONKey.FetchLimit.rawValue] {

        
        var jsonObject = JSONObject()
        
        jsonObject[JSONKey.SortDescriptors.rawValue] = self.sortDescriptors.toJSON()
        
        jsonObject[JSONKey.Predicate.rawValue] = self.predicate?.toJSON()
