title: Does AlamofireObjectMapper / ObjectMapper support struct type mapping
body: <p>I am using <a href="https://github.com/tristanhimmelman/AlamofireObjectMapper" rel="noreferrer">AlamofireObjectMapper</a> to parse json response to my object. The AlamofireObjectMapper is a extension of <a href="https://github.com/Hearst-DD/ObjectMapper/" rel="noreferrer">ObjectMapper</a>. </p>
  
  <p>According to their documents, my model class has to conform to <code>Mappable</code> protocol. For example:</p>
  
  <pre><code>class Forecast: Mappable {
      var day: String?
      var temperature: Int?
      var conditions: String?
  
      required init?(_ map: Map){
  
      }
  
      func mapping(map: Map) {
          day &lt;- map["day"]
          temperature &lt;- map["temperature"]
          conditions &lt;- map["conditions"]
      }
  }
  </code></pre>
  
  <p>In order to conform to Mappable protocl, my model class has to implement the required initializer and the mapping function for each field. It makes sense.</p>
  
  <p><strong>BUT, how does it support <code>struct</code> type?</strong> For example, I have a <code>Coordinate</code> structure, I try to conform to the <code>Mappable</code> protocol:</p>
  
  <pre><code>struct Coordinate: Mappable {
      var xPos: Int
      var yPos: Int
  
      // ERROR: 'required' initializer in non-class type
      required init?(_ map: Map) {}
  
      func mapping(map: Map) {
          xPos &lt;- map["xPos"]
          yPos &lt;- map["yPos"]
      }
  }
  </code></pre>
  
  <p>I cannot make my <code>Coordinate</code> conform to the Mappable, because of the error I show above. </p>
  
  <p>(I think it is quite often that using <code>struct</code> for coordinate data instead of using <code>class</code>)</p>
  
  <p><strong>My questions</strong>:</p>
  
  <p><strong>Q1.</strong> Does AlamofireObjectMapper or ObjectMapper library support <code>struct</code> type? How to use them parsing json response to a <code>struct</code> type object then? </p>
  
  <p><strong>Q2.</strong> If those libraries doesn't support parsing json response to struct type object. What is the way to do so in iOS with Swift2 ? </p>