title: JSON accepted format according to Newtonsoft Json
body: <p>I am trying to parse some JSON objects which is made just of (string,string) pairs, in order to emulate Resjson behaviour. The file I am parsing contains this.</p>
  
  <pre><code>{
     "greeting":"Hello world",
     "_greeting.comment":"Hello comment.",
     "_greeting.source":"Original Hello",
  }
  </code></pre>
  
  <p>Please note the last comma is incorrect, and I also used <a href="http://jsonlint.com/" rel="nofollow">http://jsonlint.com/</a> to test JSON syntax. It tells me it is incorrect, as I expected. My - slightly modified - code is :</p>
  
  <pre><code>string path = @"d:\resjson\example.resjson";
  string jsonText = File.ReadAllText(path);
  
  IDictionary&lt;string, string&gt; dict;
  try
  {
      dict = JsonConvert.DeserializeObject&lt;IDictionary&lt;string, string&gt;&gt;(jsonText);
  }
  catch(Exception ex)
  {
      // code never reaches here
  }
  </code></pre>
  
  <p>My above code returns the IDictionary with the 3 keys as if the formatting was correct. If I serialize back, the string obtained is without the last comma.</p>
  
  <p>My questions are :</p>
  
  <ul>
  <li>Is Newtonsoft.Json so permissive that it allows users slight errors ?</li>
  <li>If so, can I set the permissiveness so that it is more strict ?</li>
  <li>Is there a way to check if a string is valid JSON format, using
  Newtonsoft.Json with and/or without the permissiveness?</li>
  </ul>