prettyauto.cpp (rapidjson-1.0.2) | : | prettyauto.cpp (rapidjson-1.1.0) | ||
---|---|---|---|---|
skipping to change at line 51 | skipping to change at line 51 | |||
#else | #else | |||
// You may also use static bound encoding type, such as output to UTF-16LE w ith BOM | // You may also use static bound encoding type, such as output to UTF-16LE w ith BOM | |||
typedef EncodedOutputStream<UTF16LE<>,FileWriteStream> OutputStream; // N EW | typedef EncodedOutputStream<UTF16LE<>,FileWriteStream> OutputStream; // N EW | |||
OutputStream eos(os, true); // N EW | OutputStream eos(os, true); // N EW | |||
PrettyWriter<OutputStream, UTF8<>, UTF16LE<> > writer(eos); // C HANGED | PrettyWriter<OutputStream, UTF8<>, UTF16LE<> > writer(eos); // C HANGED | |||
#endif | #endif | |||
// JSON reader parse from the input stream and let writer generate the outpu t. | // JSON reader parse from the input stream and let writer generate the outpu t. | |||
//if (!reader.Parse<kParseValidateEncodingFlag>(is, writer)) { | //if (!reader.Parse<kParseValidateEncodingFlag>(is, writer)) { | |||
if (!reader.Parse<kParseValidateEncodingFlag>(eis, writer)) { // CHANGED | if (!reader.Parse<kParseValidateEncodingFlag>(eis, writer)) { // CHANGED | |||
fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode())); | fprintf(stderr, "\nError(%u): %s\n", static_cast<unsigned>(reader.GetErr orOffset()), GetParseError_En(reader.GetParseErrorCode())); | |||
return 1; | return 1; | |||
} | } | |||
return 0; | return 0; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added |