title: How to create default json object from json schema in c#
body: <p>I can not google that thing on <code>json.net</code> <a href="http://www.newtonsoft.com/json/help/html/R_Project_Documentation.htm" rel="nofollow">api reference</a> or anywhere.
  I want to create object from json schema with default values filled in.
  Basically some thing like this:</p>
  
  <pre><code>var JsonSchema=JsonSchema.ReadSchemaFromSomeWhere();
  dynamic DefaultObject= JsonSchema.GetDefaultObject();
  </code></pre>
  
  <p>Example you might see in <a href="https://github.com/chute/json-schema-defaults" rel="nofollow">json-schema-defaults</a> package.</p>
  
  <p><strong>Example</strong></p>
  
  <pre><code>var JsonSchema=JsonSchema.ReadSchemaFromString("
  {
    "title": "Album Options",
    "type": "object",
    "properties": {
      "sort": {
        "type": "string",
        "default": "id"
      },
      "per_page": {
        "default": 30,
        "type": "integer"
      }
    }");
  
  dynamic DefaultObject= JsonSchema.GetDefaultObject();
  
  //DefaultObject dump is
  {
    sort: 'id',
    per_page: 30
  }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I want lib or api in json.net to create object with default values from any given valid json schema during runtime.</p>