text: Q:
  
  Parsing JSON with Mantle - Swift
  
  I'm using mantle to parse JSON data with Swift. The content of the JSON file consists of:
  {
      "Name1": [
        {
          "Type": "New",
          "Available": true,
          "Kind": "4178228729",
          "Loot": "4367",
          "Advanced": [
            {
              "Type": "Old",
              "Name": "RoundRobin",
          "Available": true,
              "Specs": [
                {
                  "Type": "Fire",
                  "Available": true,
  
                  "Actions": [
  
                  --continues with similar pattern--
      ],
      "Name2": [
                  --repeats the same pattern at before--
      ]
  }
  
  I created the model classes, inheriting from MTLJSONSerializing. The "first level class" is to contain the two top level arrays of objects.
  import Foundation
  
  class lv1Class: MTLJSONSerializing {
      let name1: Array<lv2Class> = []
      let name2: Array<lv2Class> = []
  
          class func name2JSONTransformer() -> NSValueTransformer {
          return NSValueTransformer.mtl_JSONArrayTransformerWithModelClass(lv2Class.self)
      }
  
          class func name1JSONTransformer() -> NSValueTransformer {
          return NSValueTransformer.mtl_JSONArrayTransformerWithModelClass(lv2Class.self)
      }
  
          override class func JSONKeyPathsByPropertyKey() -> [NSObject : AnyObject]!
      {
          return ["name1": "Name1",
              "name2": "Name2"]
      }
  }
  
  And it goes on like this deeper and deeper.
  import Foundation
  
  class lv2Class: MTLJSONSerializing {
      let type: String = ""
      let available: Bool = true
      let kind: String = ""
      let loot: String = ""
      let advanced: Array<lv3Class> = []
  
          class func advancedJSONTransformer() -> NSValueTransformer {
          return NSValueTransformer.mtl_JSONArrayTransformerWithModelClass(lv3Class.self)
      }
  
          override class func JSONKeyPathsByPropertyKey() -> [NSObject : AnyObject]!
      {
          return ["type": "Type",
          "available": "Available",
          "kind": "Kind",
          "loot": "Loot",
          "advanced": "Advanced"]
      }
  }
  
  The other classes are similar in structure. (I can post them all on gists if necessary.)
  The call to get the JSON data is as follows:
    if let lv1ClassObject = MTLJSONAdapter.modelOfClass(lv1Class.self, fromJSONDictionary: testDic,  error: errorjson) as? lv1Class
  
  testDic is the file posted above.
  The call that i make to get the json data succeeds, I'm pretty confident that the problem is in my data model. The value of the dictionary is an array so I feel pretty confident parsing it as an array. 
  The error I get is:
  Assertion failure in -[MTLJSONAdapter initWithJSONDictionary:modelClass:error:], /Users/xx/Documents/Xcode/My_project/Pods/Mantle/Mantle/MTLJSONAdapter.m:149
  2015-03-14 14:34:20.331 My_project[25794:711328] *** Caught exception available is not a property of My_project.lv2Class
  
  But available is a property of such class...
   let available: Bool = true
  
  Hope it's clear enough, if you have any question feel free to ask.
  I'm really not familiar with parsing JSON, thanks everyone for the help.
  
  A:
  
  Answer is here.
  
  You both need to put them as  dynamic and to make sure that all your property can be bridged to the equivalent Obj-C property.
  
  