Commit 362221d3 authored by Milo Yip's avatar Milo Yip

Merge pull request #274 from pah/fixes/273

tutorial.cpp: fix insitu parsing (closes #273)
parents b4844079 953cda14
......@@ -24,12 +24,10 @@ int main(int, char*[]) {
return 1;
#else
// In-situ parsing, decode strings directly in the source string. Source must be string.
{
char buffer[sizeof(json)];
memcpy(buffer, json, sizeof(json));
if (document.ParseInsitu(buffer).HasParseError())
return 1;
}
#endif
printf("\nParsing to document succeeded.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment