Skip to main content

Announcing Xrm Entity Serializer

By Betim Beja ·

A few months ago I started my journey in the Microsoft Dynamics CRM world, and since I like to get deep into the details of the environments I work, I started experimenting with the system and tried to get answers for all the crazy ideas I had while doing these experiments.

One of the many challenges I faced was serializing/deserializing an Xrm Entity to/from JSON. The two problems faced with Xrm Entity were that the class has a lot of read only properties and that Guid-s were being serialized to string so we were losing the the type and the deserialization would not work in all the cases. I solved these two particular problems by implementing custom converters for the problematic types and created this helper library which used these custom converters to correctly serialize/deserialize the Entity class.

In the meantime I have been doing small contributions to the FakeXrmEasy repository, where after reading the following issue I thought that maybe other people might be facing the same problem with serializing the Entity class and maybe they didn't have time to think of a solution, so I decided to create the open source project XrmEntitySerializer on GitHub.

I am certain that the project needs a lot of improvements to be really useful and would kindly ask anyone to contribute starting with sharing this article with their connections. I opened issue #1 on GitHub on purpose about improving documentation because it is that easy contributing to an open source project.

This project has been a nice opportunity for me to experiment with Azure Pipelines, Coveralls.Net, Coveralls.io and NuGet, where publishing the coverage reports to Coveralls.io from Azure Pipelines was the most interesting challenge I faced.