How to avoid duplicate values in a PostgreSQL JSON data type?
<p>I have the next example code:</p>

<pre><code>CREATE TABLE books ( id integer, data json );

INSERT INTO books VALUES (1,
  '{ id: 1,id: 1,"name": "Book the First" }');
</code></pre>

<p>You can see that <code>id</code> is a field within the format JSON that's duplicated, I understand that PostgreSQL have some feature that avoid that issue, but I can not find it.</p>