title: Deserialize recursive polymorphic class in GSON
body: <pre><code>class Complex implements Recursive {
    Map&lt;String, Recursive&gt; map;
    ...
  }
  
  class Simple implements Recursive { ... }
  </code></pre>
  
  <p>How do I deserialize this json:</p>
  
  <pre><code>{
    "type" : "complex",
    "map" : {
       "a" : {
          "type" : "simple"
       },
       "b" : {
          "type" : "complex",
          "map" : {
              "ba" : {
                  "type" : "simple"
          } 
       } 
    }
  }
  </code></pre>
  
  <p>using Google GSON?</p>