Visual Studio 2015 add JSON-File - json

I have a WebApplication MVC Porject. In the folder App_Data i want to add a json-file.
But Visual Studio does not suggest me to add a Json-File even not if i want to add a new Element.
How can I add a json? Just to use a normal text file and rename it as json?

You can find it under Web. Consider using the search-bar top right if you can't find something, if it does not show up in search you wont be able to do it.
JSON:

Yes, you would just change the file extension to .json
Adding Product.json file

Related

I downloaded my chrome bookmarks to move to a new computer and it saved as a XML instead of HTML - when I try to convert i get an error

I tried using several conversions -- I've used Altova and a couple of other free software options. I don't know how to add the XML file for you to view but would really appreciate some help!
When I use the Export Bookmarks option on Chrome browser, by default, the only option it allows is to save as an HTML file. If you did mistakenly save as an XML file, then using an XML editor like use probably used from Altova will most likely create more errors.
1) I'd suggest, you first right-click on the XML bookmarks file and go to Properties tab and see if you can restore the oldest, least-modified version of it.
2) Then simply try renaming the extension of the bookmarks file from .xml to .html to see if it now works.

How to save angular.json as UTF-8?

I am deploying an Angular project on Ubuntu and am running into This issue ("Unexpected token m in JSON at position 0.")
Someone suggested that I resave my angular.json file as UTF-8. I'm not exactly sure how to do that, do I need to add code or just change a file type?
If anyone knows how to do that (and why that might help) that would be great. Thanks!
To change the encoding of a file within vscode, do the following:
Open the file.
Look in the bottom right corner and press the name of the current encoding. In my example image below it is already UTF-8.
Select "save with encoding".
Pick the encoding you want to save the file with.

Ant + JSON: How to read JSON from a file, modify it then write it back to the file

I need to do this using Ant in an Eclipse project:
Read a JSON file (that is located inside my Eclipse project), parse it, so I can make a change on one of the attributes in there, and finally write the resulting JSON back to the same file.
Is this possible? I have tried using an approach of using with JavaScript, but I can't even reach the file without specifying an absolute path (that I don't want to do, I'd prefer this to be relative to the Ant script.)
Thanks in advance

How do I enable code formatting for JSON in Zend Studio?

I would like to enjoy code formatting for .json files in Zend Studio. I have tried associating the .json extension with the JavaScript editor, but this has no effect, and Ctrl+Shift+F simply does nothing.
How can I achieve what I want?
You have to add the file types in "Content Types" as well as in "File Associations", as in:
https://support.zend.com/hc/en-us/articles/203838106-How-to-Add-File-Types-to-the-PHP-Editor

JSON Javascript highlighting in Visual Studio 2010

Does anybody know how to get VS 2010 to use the same highlighting for a file called .JSON as it uses for a JavaScript file? Just working on a client site and they've named all their JSON template files as .JSON, with the result that I just get a plain old text editor when I open it in Visual Studio. Any suggestions? I'm sure there must be an option somewhere that would do it but I can't find it so far...
Tools -> Options -> Text Editor -> File Extension
End your extension 'json' and select 'Script Editor' and click 'add'.
Re-open any json documents for it to take affect.
Another option is to use Text Highlighter (extention for Visual Studio 2010), which offers syntax highlighting for the following text formats:
.json (also offer syntax validation)
.bat
.cmd
.ini
.txt
.log
Great news!
In CTP2 of Visual Studio 2013 Update 2 that was added a New JSON project item and editor