tag:blogger.com,1999:blog-1541119677388434036.post1804389926109730260..comments2024-03-28T13:09:49.789+01:00Comments on CRM Answers: JSON and CRM Sandbox PluginsGuidohttp://www.blogger.com/profile/09944164687094653429noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-1541119677388434036.post-35318718822507601962016-03-10T12:29:34.470+01:002016-03-10T12:29:34.470+01:00Thanks Guido, That saved my time. One thing that c...Thanks Guido, That saved my time. One thing that caused me problem is my object and all its fields should be public. Then only it is able to convert..Srikanthhttps://www.blogger.com/profile/05227187130280072263noreply@blogger.comtag:blogger.com,1999:blog-1541119677388434036.post-70888671436077093982015-11-03T16:39:20.244+01:002015-11-03T16:39:20.244+01:00thanks for the Newtonsoft.Json update, I will test...thanks for the Newtonsoft.Json update, I will test it as soon as possible. Regarding the decorators of your previous comment, when I created a plugin using DataContractJsonSerializer I didn't add decoratorsGuidohttps://www.blogger.com/profile/09944164687094653429noreply@blogger.comtag:blogger.com,1999:blog-1541119677388434036.post-59568260666225939862015-11-02T14:33:19.503+01:002015-11-02T14:33:19.503+01:00By the way, Newtonsoft.Json, at least newest versi...By the way, Newtonsoft.Json, at least newest version I have tried 7.0.1 WORKs inside sandbox mode.Alexey Shytikovhttps://www.blogger.com/profile/08609813575167861345noreply@blogger.comtag:blogger.com,1999:blog-1541119677388434036.post-78711024179612981742015-11-02T14:28:01.700+01:002015-11-02T14:28:01.700+01:00It finally worked for me, but I had to mark my cla...It finally worked for me, but I had to mark my class definition with [DataContract] attribute. And all public fields was marked as [DataMember].<br /><br />This is not mentioned in the article, and without it this steps code raises security exceptions. Since it tries to reflect members of the class. And this is forbidden in sandboxed environment.Alexey Shytikovhttps://www.blogger.com/profile/08609813575167861345noreply@blogger.comtag:blogger.com,1999:blog-1541119677388434036.post-79712142564210732822015-11-02T11:51:09.196+01:002015-11-02T11:51:09.196+01:00This approach sometimes also fails. I'm trying...This approach sometimes also fails. I'm trying to identify pattern, but it is not that reliable too.Alexey Shytikovhttps://www.blogger.com/profile/08609813575167861345noreply@blogger.com