Introduction
Visual Studio 2013 Update 2 added new JSON editor(JSON file type) to Visual Studio and the features are Colorization, Syntax validation, Outlining and Automatic brace completion.We will see the feature details one by one.
Feature#1 : Add New Item - JSON File:
In order to add JSON file to Web application project > Right Click > Add > New Item > Web > Markup > JSON File. It creates .json file with default one brace opened and closed.
Feature#2 : Colorization:
Once the file is opened in JSON editor, it has distinct colors to types like below
Feature#3 : Syntax validation:
If we build the project, visual studio validates JSON code and provides syntax errors as warnings in Error List window. If you double click on error it takes you to exact error location with in the file. Below images shows the syntax errors with in the JSON file.
Feature#4 : Outlining
Outlining (collapse or expanding content) is available for JSON content for easier navigation. If we have large JSON file, this feature will be more useful.
Feature#5 : Automatic brace completion
When we type brace, bracket or quote then matching close character will be automatically inserted after the cursor.
Change Settings
If you want to change any setting for JSON editor you can do at Tools > Options (search for json) > Text Editor > JSON.
Hope we can have more features from next releases.