Title: JSON with json_name Post by: Candy M. on July 12, 2018, 03:24:15 am I'm in the process of integrating with a shipping webservice.
The JSON I get in the response looks like this: {"poMasterIds":[],"errorMap":{"0":["Unit weight for POLine 0 is null"]},"isSuccess":false,"errorCode":601} So I have a little program to try to interpret it. I used util.JSON.proposeType and it said to use this: Code
So I did that and this is my little program: Code Here is my output from DISPLAY statements: Code
So I'm unable to display ["Unit weight for POLine 0 is null"] So I think I have something wrong in my structure. Does anyone have any ideas? Thanks! Candy Title: Re: JSON with json_name Post by: Gary C. on July 12, 2018, 09:02:02 am Hi Candy
I faced a very similar issue where the resulting JSON string contained a dictionary for the errors which I think may help. It is in the GWS section of the forum: http://4js.com/fjs_forum/index.php?topic=1247 (http://4js.com/fjs_forum/index.php?topic=1247) Gary Title: Re: JSON with json_name Post by: Candy M. on July 12, 2018, 02:55:17 pm Thanks so much Gary. Delane was able to provide me modified code using dictionary and that appears to be the solution. I'm going to get more "error" output and be sure it works correctly.
Candy |