I am trying to create json using rapidjson::Writer without creating document but it just give json text but don't create full json output like below,
{ "data": { "dataIn": { "hello":"world", "t":true, "f":false }, "dataOut": { "n":null, "i":123, "pi":3.1416 } } }
On rapidjson documents as well not enough info given. Can please help with it. How I can achieve this?
On rapidjson documents as well not enough info given. Can please help with it. How I can achieve this?- That is not true if I correctly understood your intentions.At RapidJSON:Sax look for paragraph Writer - example given there is almost the same as the one you're asking for.
I wrote It myself to check if it is working .. and it is:
The output is:
But if you want to get such a JSON string you might also use raw strings like:
and then pass it to
rapidjson::Document: