JSON Element isJsonNull true on {} values
<p>I have the following JSON response and I am using GSON google Java lib 2.3.1 for parsing JSON objects.</p>

<pre><code>{
    "ClubName": "Test 3 Day",
    "Date": {},
    "CurrentSeqNo": {},
    "Logo": "/online/devadehil/club.png",
    "IsDateDisplayed": "false",
    "Secured": "false"    
}
</code></pre>

<p>I am using Java code as follows:</p>

<pre><code>JsonElement elem = response.get("Date");
 if(!elem.isJsonNull()) //set to true
  elem.getAsString(); // throws exception here 
</code></pre>

<p>Exception:</p>

<pre><code>java.lang.UnsupportedOperationException: JsonObject
</code></pre>