rapidjson
rapidjson copied to clipboard
Support line ending options
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I think this can be done in output stream instead. Also, standard file i/o stream should already have conversion.
I think this can be done in output stream instead. Also, standard file i/o stream should already have conversion.
I am not pretty much sure about it.
But we are using StringBuffer
to get prettier string. Something like below -
rj::StringBuffer sb;
rj::PrettyWriter<rj::StringBuffer, rj::UTF8<>, rj::UTF8<>, rj::CrtAllocator, rj::kWriteNanAndInfFlag> handler(sb);
handler.SetLineEnding(le);
handler.SetFormatOptions(lf);
handler.SetIndent(indentChar, indentLen);
rj::Reader reader;
rj::StringStream ss(jsonText.c_str());
success = reader.Parse<someflags>(ss, handler) && sb.GetString();
Here, we are expecting that sb.GetString should provide pretty json with desired line ending option.
@miloyip Is there anything needed from my end to get this accepted and merged?