本文主要是介绍Rapid Json 可视化 rapidjson.natvis In VS2013,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
将下面代码复制为utf8 rapidjson.natvis 到 \Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\Debugger\Visualizers\
和其他natvis文件放在一起
就可以在VS2013的c++环境调试中可视化查看rapidjson数据结构
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"><Type Name="rapidjson::GenericValue<*,*>"><DisplayString Condition="flags_ == 0">NULL</DisplayString><!-- edit By superzmy QQ25360199 --><DisplayString Condition="flags_ == 0x101">False</DisplayString><DisplayString Condition="flags_ == 0x102">True</DisplayString><DisplayString Condition="(flags_ & 0x30FF) == 0x3006">{data_.n.i64}</DisplayString><DisplayString Condition="(flags_ & 0x30FF) ==0x1006">{data_.n.u64}</DisplayString><DisplayString Condition="(flags_ & 0x40FF) ==0x4006">{data_.n.d}</DisplayString><DisplayString Condition="flags_ == 3 && data_.o.size == 0">表(0){}</DisplayString><DisplayString Condition="flags_ == 4 && data_.a.size == 0">组[0]{}</DisplayString><DisplayString Condition="flags_ == 3 && data_.o.size == 1">表(1){{data_.o.members[0]}}</DisplayString><DisplayString Condition="flags_ == 4 && data_.a.size == 1">组[1]{{data_.a.elements[0]}}</DisplayString><DisplayString Condition="flags_ == 3 && data_.o.size == 2">表(2){{data_.o.members[0]}, {data_.o.members[1]}}</DisplayString><DisplayString Condition="flags_ == 4 && data_.a.size == 2">组[2]{{data_.a.elements[0]}, {data_.a.elements[1]}}</DisplayString><DisplayString Condition="flags_ == 3">表({data_.o.size,i}){{data_.o.members[0]}, {data_.o.members[1]}, ...}</DisplayString><DisplayString Condition="flags_ == 4">组[{data_.a.size,i}]{{data_.a.elements[0]}, {data_.a.elements[1]}, ...}</DisplayString><DisplayString Condition="flags_ == 0x700005">{data_.ss.str,s8}</DisplayString><DisplayString Condition="(flags_ & 0xFF) == 5 && flags_ != 0x700005">{data_.s.str,s8}</DisplayString><Expand><Item Condition="flags_ == 3" Name="个数">data_.o.size,i</Item><ArrayItems Condition="flags_ == 3"><Size>data_.o.size</Size><ValuePointer>data_.o.members</ValuePointer></ArrayItems><Item Condition="flags_ == 4" Name="个数">data_.a.size,i</Item><ArrayItems Condition="flags_ == 4"><Size>data_.a.size</Size><ValuePointer>data_.a.elements</ValuePointer></ArrayItems></Expand></Type><Type Name="rapidjson::GenericMember<*,*>"><DisplayString>{name} 〓 {value}</DisplayString><Expand><ExpandedItem>value</ExpandedItem></Expand></Type></AutoVisualizer>
这篇关于Rapid Json 可视化 rapidjson.natvis In VS2013的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!