title: JSON Serialization attribute to expand object and serialize its fields directly
body: <p>I have some class with following structure</p>
  
  <pre><code>public class A {
    [JsonProperty(PropertyName = "prop_b")]
    public B PropB {get; set;}
  }
  
  public class B {
    [JsonProperty(PropertyName = "val1")]
    public int Val1 {get; set;}
  
    [JsonProperty(PropertyName = "val2")]
    public int Val2 {get; set;}
  }
  </code></pre>
  
  <p>Which would be serialized to a JSON of the following scheme:</p>
  
  <pre><code>{
    "prop_b": { "val1": X, "val2": Y }
  }
  </code></pre>
  
  <p>Is there any way for me to skip <code>B</code> and serialize the fields directly, without changing the class structure? I would assume there would be some attribute, or that I could implement one.</p>
  
  <pre><code>{
     "val1": X,
     "val2": Y
  }
  </code></pre>