Visual Studio: JSON visualizer when debugging
When debugging in Visual Studio 2010 and hovering over a variable name, I'm given the option to use 3 different bui开发者_Python百科lt-in visualizers: Text, XML, & HTML.
Here is an example of what I'm referring to:
Since I'm doing more and more work with JSON based data, is there a JSON visualizer that I can install?
Yes, use this addon on Codeplex.
archive.org - JSON Viewer on Codeplex
Overtly visible disclamer: I wrote this and I'm giving it away for free via Microsofts Visual Studio Gallery. No ads, no link to my own site or anything.
I found this thread when looking for the exact same thing but seeing that http://jsonviewer.codeplex.com/ is "A visualizer for Visual Studio 2005" i felt that it was probably to outdated for my use. So I wrote a new visualizer instead (with built in jsonlint-support!). It has been tested with Visual Studio 2012 (but probably works fine for at least 2008 and 2010) and available from Microsofts Visual Studio Gallery.
You may reference theses posts:
JSON Debugger visualizer in Visual Studio 2012
JSON Debugger Visualizer in Visual Studio 2013
Actually it does work in visual studio 2010, but you have to unblock the assemblies. In explorer right click on the DLL and view properties the is a button to unblock the assembly.
I know the question references specifically Visual Studio 2010, but at least in Visual Studio 2019, the JSON Visualizer is already integrated so you don't need any extension, I would say.
Just select the JSON Visualizer in variable's view context menu:
And then press the view button:
精彩评论