Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON sample to [DataContract]

Is there any tool allowing to generate DataContract entity definitions based on a JSON sample? I'm really missing the old good WSDL metadata with code generation facilities.

like image 463
Ivan G. Avatar asked Oct 28 '11 18:10

Ivan G.


2 Answers

I know this is a very old question but it's worth noting that if you're using Visual Studio you get that without any external tools - you can copy some JSON in your clipboard and then go to Edit > Edit Special > "Paste JSON As Classes".

like image 97
charisk Avatar answered Oct 05 '22 16:10

charisk


Yes, you can find such a tool at http://jsontodatacontract.azurewebsites.net/. There's a post about it at http://blogs.msdn.com/b/carlosfigueira/archive/2011/01/11/inferring-schemas-for-json.aspx.

like image 22
carlosfigueira Avatar answered Oct 03 '22 16:10

carlosfigueira