Is there a way in Jackson to check if a JSON string compatible with a POJO?
<p>I have a json string and two different classes with different properties. Classes looks like this:</p>
<h2>Student</h2>
<p>studentId</p>
<p>name</p>
<p>surname</p>
<p>gpa</p>
<p>Getters/Setters</p>
<h2>Teacher</h2>
<p>teacherId</p>
<p>name</p>
<p>surname</p>
<p>Getters/Setters</p>
<p>Now I get a json string and I need a function to return boolean value if the json string is compatible with the object model.</p>
<p>So json might be like this:</p>
<pre><code>{studentId: 1213, name: Mike, surname: Anderson, gpa: 3.0}
</code></pre>
<p>I need a function to return true to something like this:</p>
<pre><code>checkObjectCompatibility(json, Student.class); 
</code></pre>