title: how to handle type boolean and object in retrofit response?
body: <p>i m getting response from server and inside response there is object and object contains another arrayofobjects and an individual object  contains object (this object is sometimes returning me object and sometimes server is sending me false)  so in case of false i m getting error <strong>RetrofitError:com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BOOLEAN at line 1 column 9774</strong></p>
  
  <p>how can i resolve this  issue ? </p>
  
  <pre><code>public class NotificationResponse {
  
      private UserNotificaions User_Notificaions;
      private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  }
  public class UserNotificaions {
   private List&lt;Record&gt; records = new ArrayList&lt;Record&gt;();
      private Pager pager;
      private Integer nextPage;
      private Integer prePage;
      private Map&lt;String, Object&gt; additionalProperties = new HashMap&lt;String, Object&gt;();
  }
  public class Record{
  private String name;
  private String title;
  private String profile_image;
  private String id;
  private String uid;
  private String notification_type_id;
  
  private String bid;
  private String is_read;
  private String total_notifications;
  private BcastObj bcast_obj;
      private User user_obj;
  }
  public class BcastObj {
      private String bid;
      private String name;
      private String message;
      private String tags;
  }
  public class User
  {
  
      private String total;
  
      private String broadcast_comment_id;
  
      private String bid;
  }
  </code></pre>
  
  <p><a href="http://pastie.org/10418603#5,9,13-15,18,24,88,90,101-102,105,108-109,120,143,145,484,530,533,537,608" rel="nofollow"> SERVER response </a> please take a look into  "user_obj" and bcast_obj" in some conduitions server is sending me false in bcast_obj" while in some its not sending me bcast_obj" and only sending me user_obj  so how to handle these two parts .... the major issue is once server is sending me  <strong>false</strong> in <strong>user_obj</strong></p>
  
  <p>HERE is the " false " reciving in an object </p>
  
  <pre><code> {
              "name": null,
              "title": "NewBroadcastcreated",
              "message": "abcihascreatednewbroadcast.",
              "full_name": "abci",
              "profile_thumb": "",
              "profile_image": "",
              "id": "C24-F5C8-DD24-4FF6-44978782082F",
              "uid": "4E8A0-F3DD-C41D-4105-6443222CAB3C",
              "notification_type_id": "2",
              "is_created": "1420",
              "sender_id": "F492B0-FB8C-8CD8-4C51-D77BEC987A78",
              "type": "general",
              "bid": "E1D-4426-B095-5F55-18A120F8C9D6",
              "is_read": "1",
              "is_notify_popup": "0",
              "total_notifications": "937",
              "bcast_obj": false
          }
  </code></pre>