Visual Studio: JSON visualizer when debugging
Solution 1
You may reference theses posts:
JSON Debugger visualizer in Visual Studio 2012
JSON Debugger Visualizer in Visual Studio 2013
Solution 2
Yes, use this addon on Codeplex.
archive.org - JSON Viewer on Codeplex
Solution 3
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.
Solution 4
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.
Solution 5
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:
Related videos on Youtube
Dan Esparza
As a Software Developer I really like Go / Docker / C# / ASP.NET / MVC / Bootstrap / ReactJS and Flux / yarn / webpack / AppVeyor, CircleCI, RedGate Ants, and that my favorite comic has its own website. As a budding software entrepreneur I like Hacker News, Trello, Stripe, Github, CircleCI, Balsqmiq mockups, Pingdom, CloudFlare, MailGun, DigitalOcean and Amazon EC2. As a cook, I really like the French & Good Eats. As an American, I like College Football and Baseball. As an iPhone & iPad user, I like Reeder, & 1Password. As a lover of the interwebs, I like Pinboard.in, Pocket, Flickr, Yelp, Keepass, and Dropbox As a network and web security hobbyist, I follow Bruce and was illuminated by the Base Rate fallacy. As a geek, I really enjoy learning about quantum physics and I'm amazed by the double slit experiment. Feynman was a rock star in my book.
Updated on June 22, 2022Comments
-
Dan Esparza about 2 years
When debugging in Visual Studio 2010 and hovering over a variable name, I'm given the option to use 3 different built-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?
-
Ofer Zelig over 12 yearsNo - it produces 'System.IO.FileNotFoundException' when you click a variable and choose JSON as the visualizer. I'm using the latest version which is 1.2.
-
Dan Esparza over 10 yearsFlipping. Awesome. Thanks!
-
PUG over 10 yearsi cant find JsonViewer.dll.config
-
PUG over 10 yearscan it convert a object into json string?
-
Karl-Johan Sjögren over 10 yearsNo, this is just a tool to preview JSON in string variables in Visual Studio. If you need to work with JSON in your own project (serializing/deserializing objects for example) you should have a look at JSON.Net. james.newtonking.com/json
-
Greg Woods almost 8 yearsSystem.InvalidCastException: Unable to cast object of type 'EPocalipse.Json.Visualizer.JsonVisualizer' to type 'Microsoft.VisualStudio.DebuggerVisualizers.DialogDebuggerVisualizer'. at Microsoft.VisualStudio.DebuggerVisualizers.DebugViewerShim.ManagedShim.DelegatedHost.CreateViewer(IntPtr hwnd, HostServicesHelper hsh, SafeProxyWrapper proxy)
-
Karl-Johan Sjögren almost 8 yearsIt seems so, that site hasn't been up in a few months. I kinda abandoned this addon since it came builtin in Visual Studio 2015 (even the community edition). Nevertheless, I've uploaded the latest version I found on my computer (which was newer then the one available earlier) so hopefully it'll work if you are on an older version of visual studio.