title: best practice to validate if JSON string generated via java is valid (structure & data validation)
body: <p>I am generating JSON string via java jackson and write to a file. 
  Before writing to a file, I want to validate if the generated JSON is valid with respect to structure(not null values for mandatory fields) and the data is valid (for ex, 'gender' has either 'male' or 'female' values only).</p>
  
  <p>I researched in google and found that JSON Schema validation is doable. But i want to know what is the recommended best practice for my requirement. </p>