Created
March 11, 2022 07:44
-
-
Save ivanstojic/c665233b9628883a76f5b992aa1dbf69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "rapidjson/document.h" | |
#include "rapidjson/writer.h" | |
#include "rapidjson/stringbuffer.h" | |
#include <iostream> | |
using namespace rapidjson; | |
int main() { | |
const char* json = "{\"shit\":-1.1030161663305387}"; | |
Document d; | |
d.Parse(json); | |
StringBuffer buffer; | |
Writer<StringBuffer> writer(buffer); | |
d.Accept(writer); | |
std::cout << json << std::endl; | |
std::cout << buffer.GetString() << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output, unexpectedly: