title: How to list all Variables of a class in swift
body: <p>Is there a way to list all Variables of a class in Swift?</p>
  
  <p>For example:</p>
  
  <pre><code>class foo {
     var a:Int? = 1
     var b:String? = "John"
  }
  </code></pre>
  
  <p>I want to list it like this: <code>[a:1, b:"John"]</code></p>