It is strange, but I've been searching a while with no acceptable result for finding a tool to highlight, validate and collapse JSON file data to edit manually in visual studio. I'm not even dreaming about IntelliSense yet. It is so popular format and no chance to edit it IDE? No plugins or native support. Trying to wire scripteditior to json had no effect.
The closest thing I've got to be able to edit json manually in convenient way is Google Chrome extension for http://jsoneditoronline.org/ that allows me to open and save files from local disk.
I've also tried to search for solutions for Visual Studio 2010 - but could not find any for this version either.
Anybody know how I can have this functionality in VS IDE?
Formatting# You can format your JSON document using Ctrl+Shift+I or Format Document from the context menu.
In Visual Studio Code, use shortcut Ctrl + Shift + P to open the Command Palette and type Open launch. json . And it will open the launch. json file for you.
If you want to add a json file directly, you can right click ->add items->choose Json file.
Open notepad++ -> ALT+P -> Plugin Manager -> Selcet JSON Viewer -> Click Install. Restart notepad++ Now you can use shortcut to format json as CTRL + ALT +SHIFT + M or ALT+P -> Plugin Manager -> JSON Viewer -> Format JSON.
JSON editing in Visual Studio Code Editing JSON with Visual Studio Code JSON is a data format that is common in configuration files like package.json or project.json. We also use it extensively in Visual Studio Code for our configuration files.
When in the JSON with Comments mode, you can use single line (//) as well as block comments (/* */) as used in JavaScript. The current editor mode is indicated in the editor's Status Bar. Click on the mode indicator to change the mode and to configure how file names and extensions are associated to modes.
You can also collapse an outlining region by double-clicking any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region. This topic applies to Visual Studio on Windows.
The JSON support shipped with VS Code supports JSON Schema Draft 7. Servers like JSON Schema Store provide schemas for most of the common JSON-based configuration files. However, schemas can also be defined in a file in the VS Code workspace, as well as the VS Code settings files.
One option is to use the Text Highlighter extension for Visual Studio 2012, which offers syntax highlighting for the following text formats:
Great news!
In CTP2 of Visual Studio 2013 Update 2 that was added a New JSON project item and editor
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With