title: How can the datatype of a JSON property be determined?
body: <p>In Java, I know you can check if a key is present with the isNull() method. Is there a way to check what kind of data the key holds? </p>
  
  <p>Consider the following examples.</p>
  
  <p>I would want a function like JSONBody.getDataType("key") and it would return String</p>
  
  <pre><code>{
      "key" : "value"
  }
  </code></pre>
  
  <p>I would want a function like JSONBody.getDataType("key") and it would return JSONObject</p>
  
  <pre><code>{
      "key" : { 
          "parm1" : "value1",
          "parm2" : "value2"
      }
  }
  </code></pre>
  
  <p>I would want a function like JSONBody.getDataType("key") and it would return JSONArray</p>
  
  <pre><code>{
      "key" : [
          "value1",
          "value2",
          "value3"
      ]
  }
  </code></pre>
  
  <p>I would want a function like JSONBody.getDataType("key") and it would return Boolean</p>
  
  <pre><code>{
      "key" : true
  }
  </code></pre>
  
  <p>Does something like this exist?</p>