web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

How to convert CRM Web API Json response to Entity in C#

(0) ShareShare
ReportReport
Posted on by

Dear All,

As we know that CRM soap organization service is getting depreciating from CRM 9.1 and we have to use the Web API instead of that. But we receive the response of API as in JSON for which if we convert or deserialize it to another data forms like Data Table etc.       

It is quite difficult to change the existing C# code all over where org service operations (CRUD) are used.

Hence Can anyone suggest if we can convert JSON response to Entity/Entity Collection? Or Any other alternative provided by Microsoft for the same.

I have the same question (0)
  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at

    Hi,

    Please go through below links, Hope it will help you.

    community.dynamics.com/.../282408

    community.dynamics.com/.../195147

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    H,

    You can convert the JSON response into an object but not sure that it would be helpful as you may still need to some cleanup or changes after this. You can either use Newtonsoft Json - www.newtonsoft.com/.../SerializingJSON.htm

    Or using the System.serialization - www.c-sharpcorner.com/.../json-serialization-and-deserialization-in-c-sharp

    Hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Dynamics 365 general

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans