title: Convert Swagger to C# object
body: <p>Is there an easy way to convert Json string to C# object?</p>
  
  <p>I have a swagger file in json format and need to make it to C# object</p>
  
  <pre><code>{
    "swagger": "2.0",
    "info": {
      "version": "Profiles",
      "title": "Profiles"
    },
    "paths": {
      "/api/Profiles/Get": {
        "get": {
          "tags": [ "Profiles"],
          "operationId": "Profiles_GetById",
          "consumes": [],
          "produces": [],
          "parameters": [{ "name": "id"}]
        }
      },
      "/api/Profiles": {
        "get": {
          "tags": [
            "Profiles"
          ],
          "operationId": "Profiles_GetBySubscriptionid",
          "consumes": [],
          "produces": [],
          "parameters": [{ "name": "subscriptionId"}]
        }
      }
    },
    "definitions": {}
  }
  </code></pre>
  
  <p>So the problem that I am facing right now is that I have no idea how to convert paths to properties of my C# object. Specifically, I have no clue how I define a C# object properties for "/api/Profiles/Get", or "/api/Profiles".</p>
  
  <pre><code>public class SwaggerObject
  {
    [JsonProperty("paths")]
    public SwaggerPath Paths { get; set;}
  }
  public class SwaggerPath {
    ... 
  }
  </code></pre>