nlohmann_json.natvis 2.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  3. <Type Name="nlohmann::basic_json&lt;*&gt;">
  4. <DisplayString Condition="m_type == nlohmann::detail::value_t::null">null</DisplayString>
  5. <DisplayString Condition="m_type == nlohmann::detail::value_t::object">{*(m_value.object)}</DisplayString>
  6. <DisplayString Condition="m_type == nlohmann::detail::value_t::array">{*(m_value.array)}</DisplayString>
  7. <DisplayString Condition="m_type == nlohmann::detail::value_t::string">{*(m_value.string)}</DisplayString>
  8. <DisplayString Condition="m_type == nlohmann::detail::value_t::boolean">{m_value.boolean}</DisplayString>
  9. <DisplayString Condition="m_type == nlohmann::detail::value_t::number_integer">{m_value.number_integer}</DisplayString>
  10. <DisplayString Condition="m_type == nlohmann::detail::value_t::number_unsigned">{m_value.number_unsigned}</DisplayString>
  11. <DisplayString Condition="m_type == nlohmann::detail::value_t::number_float">{m_value.number_float}</DisplayString>
  12. <DisplayString Condition="m_type == nlohmann::detail::value_t::discarded">discarded</DisplayString>
  13. <Expand>
  14. <ExpandedItem Condition="m_type == nlohmann::detail::value_t::object">
  15. *(m_value.object),view(simple)
  16. </ExpandedItem>
  17. <ExpandedItem Condition="m_type == nlohmann::detail::value_t::array">
  18. *(m_value.array),view(simple)
  19. </ExpandedItem>
  20. </Expand>
  21. </Type>
  22. <!-- skip the pair first/second members in the treeview while traversing a map.
  23. Only works in VS 2015 Update 2 and beyond using the new visualization -->
  24. <Type Name="std::pair&lt;*, nlohmann::basic_json&lt;*&gt;&gt;" IncludeView="MapHelper">
  25. <DisplayString>{second}</DisplayString>
  26. <Expand>
  27. <ExpandedItem>second</ExpandedItem>
  28. </Expand>
  29. </Type>
  30. </AutoVisualizer>