title: Retrofit MYSQL - Serialize value in LinkedTreeMap
body: <p>I am fetching some data from a MYSQL database, the response I get using ARC is in the following form:</p>
  
  <pre><code>{
      "Id": 1
      -"Status": {
          "type": "Buffer"
          -"data": [1]
              0:  0
      }
      "Updated": "2016-10-25T13:15:25.000Z"
      "UserName": "Aidin"
  }
  </code></pre>
  
  <p>In Android Studio I am trying to map this into an object with Retrofit and Serialization as follows:</p>
  
  <pre><code>@SerializedName("Id")
  private int id;
  @SerializedName("Status")
  private boolean status;
  @SerializedName("UserName")
  private String name;
  @SerializedName("Updated")
  private Date updated;
  
  public int getId() {
      return id;
  }
  
  public String getName() {
      return name;
  }...
  </code></pre>
  
  <p>This works as intended for every variable except for <code>Status</code>.
  My question is, how do I do this for a Bit value from MYSQL, namely <code>Status</code> which seems to be an array rather than a simple bit value?</p>
  
  <p>Doing </p>
  
  <pre><code>@SerializedName("Status")
  private boolean status;
  </code></pre>
  
  <p>Does not work.
  I can do </p>
  
  <pre><code>@SerializedName("Status")
  private LinkedTreeMap status;
  </code></pre>
  
  <p>And later use <code>status.get("data")</code> in the getter and return the bit value.
  But I would rather do something similar to:</p>
  
  <pre><code>@SerializedName("Status.get(\"data\")")
  private boolean status;
  </code></pre>
  
  <p>Is this possible? What is the standard way of doing?
  The example I gave returns a null value.</p>
  
  <h2>-------------------UPDATE-----------------</h2>
  
  <p>After reading this thread: <a href="https://stackoverflow.com/questions/289727/which-mysql-datatype-to-use-for-storing-boolean-values?rq=1">Which MySQL data type to use for storing boolean values</a></p>
  
  <p>I guess my issue was more about what type to use as a boolean in MySQL. And even though there seems to be a dispute regarding appropriate boolean type, most seem to favour Tinyint. I had chosen Bit since in my mind it seemed the closest to boolean, but I guess I was wrong. Changing to Tinyint I can serialize and parse the integer value to a boolean, no problem, so my problem is solved.</p>
  
  <p>However, there might come a time when I need to use a datatype which is presented as a LinkedTreeMap so I am still curious about whether or not it is possible to use something similar to:</p>
  
  <pre><code>@SerializedName("Status.get(\"data\")")
  private boolean status;
  </code></pre>