title: Postgresql : Is there a way to select all valid json data type
body: <p>I have a table :</p>
  
  <p><strong>table</strong></p>
  
  <pre><code>---------------------
  id  | value
  ---------------------
  1   | invalid_json
  ---------------------
  2   | valid_json
  ---------------------
  3   | invalid_json
  ---------------------
  </code></pre>
  
  <p>First of all, value is in <strong>varchar</strong> type not really declared as <strong>json</strong>, and it has some reasons why it is set up like that. Anyway, my question is about the possibility, and if possible how. Is it possible to create an sql to find only the rows that contains a <strong>VALID</strong> json formatted data even though the column data type is var char?</p>
  
  <p>A sort of : </p>
  
  <pre><code>"select * from table where (condition that data is a valid json)";
  </code></pre>