             self = .NullType(v)
         }
             
+            
         else if let v = val as? Dictionary<String,AnyObject> {
-            self = Value.JSONDictionaryType(JSONDictionary(dict: v))
+            self = Value.JSONDictionaryType(JSONDictionary(dict: v, restrictTypeChanges: restrictTypeChanges, anyValueIsNullable: anyValueIsNullable))
         }
         else if let v = val as? [AnyObject] {
-            self = Value.JSONArrayType(JSONArray(array: v))
+            self = Value.JSONArrayType(JSONArray(array: v, restrictTypeChanges: restrictTypeChanges, anyValueIsNullable: anyValueIsNullable))
         }
         else {
             return nil

public enum Value {
    case StringType(String)
    case NumberType(NSNumber)
    case NullType(NSNull)
    
    // json object types

    }
    public var null:NSNull? {
        switch self {
        case .NullType(let nullType):
            return nullType
        default:
            return nil
        }
