title: Json.NET serialize property on the same level
body: <p>I have a very long and complex JSON to send to an external web service.<br />
  The JSON has all the properties at the same level:</p>
  <pre><code>public class Request
  {
      [JsonProperty(PropertyName = &quot;prop1a&quot;)]
      public string Prop1A;
  
      [JsonProperty(PropertyName = &quot;prop2a&quot;)]
      public string Prop2A;
      
      [JsonProperty(PropertyName = &quot;prop3a&quot;)]
      public string Prop3A;
      
      [JsonProperty(PropertyName = &quot;prop1b&quot;)]
      public string Prop1B;
  
      [JsonProperty(PropertyName = &quot;prop2b&quot;)]
      public string Prop2B;
      
      [JsonProperty(PropertyName = &quot;prop3b&quot;)]
      public string Prop3B;
      
      // [...]
  }
  </code></pre>
  <p>The resulting JSON:</p>
  <pre><code>// valid JSON
  { prop1a: &quot;&quot;, prop2a: &quot;&quot;, prop3a: &quot;&quot;, prop1b: &quot;&quot;, prop2b: &quot;&quot;, prop3b: &quot;&quot; }
  </code></pre>
  <p>In order to work better I have logically separated similar properties into smaller classes:</p>
  <pre><code>public class Request
  {
      public AggregatedPropsA MyAggregatedPropsA;
      
      public AggregatedPropsB MyAggregatedPropsB;
  }
  
  public class AggregatedPropsA
  {
      [JsonProperty(PropertyName = &quot;prop1a&quot;)]
      public string Prop1A;
  
      [JsonProperty(PropertyName = &quot;prop2a&quot;)]
      public string Prop2A;
      
      [JsonProperty(PropertyName = &quot;prop3a&quot;)]
      public string Prop3A;
  }
  </code></pre>
  <p>The problem is that the json string is now invalid string because the properties are serialized on different levels:</p>
  <pre><code>// invalid JSON
  { MyAggregatedPropsA: { prop1a: &quot;&quot;, prop2a: &quot;&quot;, prop3a: &quot;&quot;}, MyAggregatedPropsB: { prop1b: &quot;&quot;, prop2b: &quot;&quot;, prop3b: &quot;&quot; } }
  </code></pre>
  <p>Is it possible to get a JSON like the first, using the second class structure?</p>