Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Saturday, December 26, 2015

How to show the

How to show the "paste Json class" in visual studio 2012 when clicking on Paste Special?


I am trying to use the past special feature in vs 2012 in order to generate c# class for my Json data. I downloaded the Json.New from NewtonSoft from Nuget and then added a new .cs class the copied my json data to clipboard but when I go to Edit-> Paste Special --> I can only see: Paste XML As Classes only the Paste Json as Classes feature is not showing. Any Suggestions? Thanks you in advance

This is what I am getting and please note that I have installed Newtonsoft.Json already:

http://icms.indevcogroup.com/uploads/untitled.png

Answer by Gareth for How to show the "paste Json class" in visual studio 2012 when clicking on Paste Special?


I created a new project, installed Newtonsoft.Json and added a class.

If you have your class file open, copy your Json data and choose Edit -> Paste Special you will see both the options:

Paste Special with Json Option

If you have some other kind of file open (e.g. app.config), you only see "Paste JSON as As Classes" (and it's greyed out)

Paste Special - 1 option and greyed out

It does seem a bit flaky though - sometimes I had to recopy the data before it would show up.

Try a) recopying your data b) playing around with what windows you've got open c) reinstalling the extension

Answer by user2005519 for How to show the "paste Json class" in visual studio 2012 when clicking on Paste Special?


Try to install update for Visual Studio I installed update v4 and now I have an option "Paste JSON As Classes"

Answer by Sean M for How to show the "paste Json class" in visual studio 2012 when clicking on Paste Special?


When selecting the Edit > Paste Special menu while in the code of a class file, make sure that the Visual Studio project that your class file is under has its 'Target Framework' set to:

.NET Framework 3.5+ for 'Paste JSON as Classes'

.NET Framework 4.5+ for 'Paste XML as Classes'

Otherwise these options do not appear.

The 'Target Framework' setting is under the Project Properties > Application.

Answer by Guy Lowe for How to show the "paste Json class" in visual studio 2012 when clicking on Paste Special?


You need to install http://www.microsoft.com/en-au/download/details.aspx?id=41532 to get the option to appear under Paste Special.

Answer by Asymmetric3.141 for How to show the "paste Json class" in visual studio 2012 when clicking on Paste Special?


I had the same issue. I was selecting the class from the solution explorer, and getting only the XML option. I finally put my carrot directly in the currly braces of the public class, then navigated to Edit->Paste Special.


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

0 comments:

Post a Comment

Popular Posts

Powered by Blogger.