RE: Deserialize JSON using C# dll file in x++
The deserializer can't know that it should use your class if you doesn't give it this information. With FormJsonSerializer, you would do this:
FormJsonSerializer::deserializeObject(classId(MyContract), json);
If you use Newtonsoft.Json library, you could use the generic DeserializeObject<T>() method:
JsonConvert.DeserializeObject();
Because X doesn't support generic methods, you'll need to do it in C#. Using C# projects is easy, but you would have to add a reference to your model to be able to use the class in in C# project, and your model would refer to the C# project / assembly as well. You should break this circular dependency, which would make things more complex.
If you can't do what you want in X , consider getting rid of the X contract class as well. You could take JSON, use Paste JSON as classes in Visual Studio to generate C# class to deserialize to and use this C# class in your X code (instead of the X contract class).