Hi,
I have run into several issues regarding calling an API based on a 'JSON from BOD' conversion of XML data. I ran into this earlier, when the XML contains a string consisting of number only. You guessed it, the resulting JSON element is a number.
Now I have an even more interesting example. I have this tag in my BOD: <itemsPackagingId>72150E400001</itemsPackagingId>. Since 'JSON from BOD' does not take into account the metadata of the BOD (in the Object Schema) nor the metadata of the API (in Available APIs), it construct the JSON data based on interpreting the data from the BOD. The resulting JSON is this: "itemsPackagingId": 7.2150E+400005. Apparently, a string of numbers containing one 'E' is being interpreted as a number in scientific notation. Interesting, isn't it?
I have brought this to the attention of Infor, but I cannot get them to share my view on this being an actual error in the software. After all, the metadata is there, so why not use it? But alas, no luck. So I am looking for a different solution.
My question is: what if I use the ION mapping to add double quotes (or a specific prefix before the actual data, say '#_' ), so the 'JSON from BOD' logic interprets this as a string, and then remove the quotes or prefix in an endpoint policy? I think I need some kind of 'transformation' policy, but I am not sure what it would have to look like. Any suggestions? Thanks, Wiebren