title: Json.net catching duplicates and throwing an error
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3877526/json-net-newtonsoft-json-two-properties-with-same-name">Json.NET (Newtonsoft.Json) - Two &#39;properties&#39; with same name?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm using JSON.NET to deserialize a JSON file into a Dictionary.  Now what I'd like to do is have the following line:</p>
  
  <pre><code>JsonConvert.DeserializeObject&lt;IDictionary&lt;string, object&gt;&gt;(text);
  </code></pre>
  
  <p>throw an exception if there are duplicate entries in the JSON like this:</p>
  
  <pre><code>{
      "ExampleText": "Example 1",
      "ExampleText": "Example 2",
      "ExampleText": "Example 3",
  }
  </code></pre>
  
  <p>The standard JSON.NET behavior is to simply replace the "ExampleText" entry with whichever entry is last in the JSON. Is it possible to have the exception thrown instead?</p>