title: How to detect duplicate keys during map construction from JSON in clojure
body: <p>I am using <a href="http://clojure.github.io/data.json/" rel="nofollow">http://clojure.github.io/data.json/</a> <code>read-str</code> to read swagger (<a href="https://openapis.org/specification" rel="nofollow">https://openapis.org/specification</a>)
  documents for semantic validation.  One of the things to validate is no duplicate paths.
  For example:</p>
  
  <pre><code>/foo/{bar}/baz
  </code></pre>
  
  <p>is a duplicate of:</p>
  
  <pre><code>/foo/{dup}/baz
  </code></pre>
  
  <p>However, if the swagger file contains two "literal" identical paths:</p>
  
  <pre><code>/foo/bar/baz : ...
  ...
  /foo/bar/baz : ...
  </code></pre>
  
  <p>When I use <code>read-str</code>, the last one "overwrites" the first one, so I can't see
  the duplicate - it is just dropped.</p>
  
  <p>Is there a way to use <code>clojure.data.json</code> to complain on duplicate keys?</p>
  
  <p>Or is there some other library I can use?</p>