title: Disable conversion of scalars to strings when deserializing with Jackson
body: <p>I want to identify numerical values inserted without quotation marks (as strings) in JSON sent through the request body of a <code>POST</code> request:</p>
  
  <p>For example, this would be the wrong JSON format as the age field does not contain quotation marks:</p>
  
  <pre><code>{
    "Student":{
      "Name": "John",
      "Age":  12
    }
  }
  </code></pre>
  
  <p>The correct JSON format would be:</p>
  
  <pre><code>{
    "Student":{ 
      "Name": "John",
      "Age":  "12"
    }
  }
  </code></pre>
  
  <p>In my code, I've defined the datatype of the <code>age</code> field as a <code>String</code>, hence <code>"12"</code> should be the correct input. However, no error message is thrown, even when <code>12</code> is used.</p>
  
  <p>It seems Jackson automatically converts the numerical values into strings. How can I identify numerical values and return a message?</p>
  
  <p>This is what I tried so far to identify these numerical values:</p>
  
  <pre><code>public List&lt;Student&gt; getMultiple(StudentDTO Student) {
      if(Student.getAge().getClass()==String.class) {
          System.out.println("Age entered correctly as String");
      } else{
          System.out.println("Please insert age value inside inverted commas");
      }
  }
  </code></pre>
  
  <p>However, this is not printing <code>"Please insert age value inside inverted commas"</code> to the console when the age is inserted without quotation marks.</p>