
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)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.