"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/encoding.md" between
rapidjson-1.0.2.tar.gz and rapidjson-1.1.0.tar.gz

About: RapidJSON is a fast JSON parser/generator for C++ with both SAX/DOM style API.

encoding.md  (rapidjson-1.0.2):encoding.md  (rapidjson-1.1.0)
skipping to change at line 134 skipping to change at line 134
~~~~~~~~~~cpp ~~~~~~~~~~cpp
#include "rapidjson/encodings.h" #include "rapidjson/encodings.h"
using namespace rapidjson; using namespace rapidjson;
const char* s = "..."; // UTF-8 string const char* s = "..."; // UTF-8 string
StringStream source(s); StringStream source(s);
GenericStringBuffer<UTF16<> > target; GenericStringBuffer<UTF16<> > target;
bool hasError = false; bool hasError = false;
while (source.Peak() != '\0') while (source.Peek() != '\0')
if (!Transcoder::Transcode<UTF8<>, UTF16<> >(source, target)) { if (!Transcoder<UTF8<>, UTF16<> >::Transcode(source, target)) {
hasError = true; hasError = true;
break; break;
} }
if (!hasError) { if (!hasError) {
const wchar_t* t = target.GetString(); const wchar_t* t = target.GetString();
// ... // ...
} }
~~~~~~~~~~ ~~~~~~~~~~
 End of changes. 1 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)