最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

Dynamics ax 2012使用JSON / Dynamics ax 2012 Use of JSON

网络文摘 William 129浏览 0评论

I’ve recently had a requirement to integrate an external system with Dynamics AX 2012’. Here is a very basic code sample of how to consume JSON using these classes in Dynamics AX 2012.

 static void myJob(Args _args)  
 {   
   RetailWebRequest request;   
   RetailWebResponse response;   
   str rawResponse, value;   
   Map data;   
   RetailCommonWebAPI webApi = RetailCommonWebAPI::construct();   
   request = RetailWebRequest::newUrl("http://mysite.com/jsonaction");   
   response = webApi.getResponse(request);   
   rawResponse = response.parmData();   
   data = RetailCommonWebAPI::getMapFromJsonString(rawResponse);   
   value = data.lookup("elementname");   
   info(strFmt("Element name: %1",value));   
 }  

Thanks

Happy Daxing 🙂

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址