Json2csharp Converter

With the recent updates of Web API in Dynamics CRM 2016 it seems like this RESTful API will be the future of Dynamics CRM API. One of the drawback of REST API is the absence of the service client creation out of WSDL (Ref: http://searchsoa.techtarget.com/definition/REST)

For developers who are coming from C# background, we are comfortable with strongly typed classes compared to Javascript which is loosely typed. Today I found this useful online tool to convert Json to C#: http://json2csharp.com/

So for an example I’ll take this sample Json:

    "glossary": {
        "title": "example glossary",
        "GlossDiv": {
            "title": "S",
            "GlossList": {
                "GlossEntry": {
                    "ID": "SGML",
                    "SortAs": "SGML",
                    "GlossTerm": "Standard Generalized Markup Language",
                    "Acronym": "SGML",
                    "Abbrev": "ISO 8879:1986",
                    "GlossDef": {
                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
                        "GlossSeeAlso": ["GML", "XML"]
                    "GlossSee": "markup"

Copy paste it into the web page, click the generate button. And...

Voila, C# classes are generated!

I hope this will be helpful for us to adopting the new CRM Web API!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s