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 :
Microsoft Dynamics AX (Archived)

Serialize ax object to Json string using Newtonsoft.Json.dll

(0) ShareShare
ReportReport
Posted on by 20

I used the below code to serialize ax object to Json using Newtonsoft.Json.dll

static void SMCJsonTest(Args _args)
{
str jsonData;
SMCTest test;

test = new SMCTest();
test.parmTest("Hello");

jsonData = Newtonsoft.Json.JsonConvert::SerializeObject(test, Newtonsoft.Json.Formatting::Indented);

info(strFmt("%1",jsonData));
}

but the result is : 

{
"XppRuntime": null,
"IsRemoteKernel": false,
"Context": {
"HttpContextAccessible": false
}
}

I think it is compiler execution issue or security issue , please advice .

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    If I was you, I would encapsulate the whole serialization logic inside a .NET assembly. Or at least I would run the whole thing in LCS - trying to serialize proxy objects for X++ classes on AX client just doesn't look like a good idea.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans