前端之家收集整理的这篇文章主要介绍了
rapidjson::Document _doc,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
- <1>@H_502_5@@H_502_5@
- rapidjson::Document_doc;@H_502_5@
- @H_502_5@
- <2>@H_502_5@
- _doc.Parse<0>(_msg.c_str());@H_502_5@
- @H_502_5@
- <3>@H_502_5@
- template@H_502_5@<unsignedparseFlags>@H_502_5@@H_502_5@
- GenericDocument&Parse(const@H_502_5@Ch*str){@H_502_5@@H_502_5@
- RAPIDJSON_ASSERT(!(parseFlags&kParseInsituFlag));@H_502_5@
- GenericStringStream<Encoding>s(str);@H_502_5@
- return@H_502_5@ParseStream<parseFlags>(s);@H_502_5@@H_502_5@
- }@H_502_5@
- <4>@H_502_5@
- template@H_502_5@<@H_502_5@typename@H_502_5@Encoding>@H_502_5@@H_502_5@
- struct@H_502_5@GenericStringStream{@H_502_5@@H_502_5@
- typedef@H_502_5@@H_502_5@typename@H_502_5@Encoding::ChCh;@H_502_5@@H_502_5@
- GenericStringStream(const@H_502_5@Ch*src):src_(src),head_(src){}@H_502_5@@H_502_5@
- ChPeek()const@H_502_5@{@H_502_5@return@H_502_5@*src_;}@H_502_5@@H_502_5@
- ChTake(){return@H_502_5@*src_++;}@H_502_5@@H_502_5@
- size_t@H_502_5@Tell()@H_502_5@return@H_502_5@src_-head_;}@H_502_5@@H_502_5@
- Ch*PutBegin(){RAPIDJSON_ASSERT(false@H_502_5@);@H_502_5@return@H_502_5@0;}@H_502_5@@H_502_5@
- void@H_502_5@Put(Ch){RAPIDJSON_ASSERT(@H_502_5@false@H_502_5@);}@H_502_5@@H_502_5@
- size_t@H_502_5@PutEnd(Ch*){RAPIDJSON_ASSERT(@H_502_5@const@H_502_5@Ch*src_;@H_502_5@
- const@H_502_5@Ch*head_;@H_502_5@
- };@H_502_5@
- <5>@H_502_5@
- template@H_502_5@<unsignedparseFlags,@H_502_5@typename@H_502_5@Stream>@H_502_5@@H_502_5@
- GenericDocument&ParseStream(Stream&stream){@H_502_5@
- ValueType::SetNull();
- GenericReader<Encoding,Allocator>reader;@H_502_5@
- if@H_502_5@(reader.@H_502_5@template@H_502_5@Parse<parseFlags>(stream,*@H_502_5@this@H_502_5@)){@H_502_5@@H_502_5@
- RAPIDJSON_ASSERT(stack_.GetSize()==sizeof@H_502_5@(ValueType));@H_502_5@
- this@H_502_5@->RawAssign(*stack_.@H_502_5@template@H_502_5@Pop<ValueType>(1));@H_502_5@
- parseError_=0;@H_502_5@
- errorOffset_=0;@H_502_5@
- }@H_502_5@
- else@H_502_5@{@H_502_5@@H_502_5@
- parseError_=reader.GetParseError();@H_502_5@
- errorOffset_=reader.GetErrorOffset();@H_502_5@
- ClearStack();@H_502_5@
- return@H_502_5@*@H_502_5@this@H_502_5@;@H_502_5@@H_502_5@
- } @H_502_5@
原文链接:https://www.f2er.com/json/289268.html