How to create empty json object correctly using web.json in cpp?
<p>I want to create following json request:</p>

<pre><code>{
  "Value1":{},
  "Value2":"some string value"
}
</code></pre>

<p>to achieve this I have tried following code in cpp:</p>

<pre><code>json::value &amp;refRequest
json::value jRequest = json::value();
refRequest[requestKey::Value1] = json::value(json::value::object()); //for creating empty object
refRequest[requestKey::Value2] = json::value::string("some string");
</code></pre>

<p>but it gives output as:</p>

<pre><code>{
  "Value1":},
  "Value2":"some string value"
}
</code></pre>

<p>if you observe, instead of returning empty object as <strong>{}</strong> it gives the output as <strong>}</strong> and this results in to malformed request. I am not sure where exactly I am going wrong, any help will would be appreciated. Thanks</p>