cancel
Showing results for 
Search instead for 
Did you mean: 

Json to XML Converter Action Block Error MII 15.1

Former Member
0 Kudos

Hi All,

I am using SAP MII 15.1 SP2 Patch 6.

I'm getting an error "Error in conversion from json to xml" when I pass Json string as a local/transaction property.

But when I pass this Json string as a JSOn Input directly in action block on Configure Box then it works fine without any error.

This looks strange to me.

Source of JSON String :

I am getting this Json string by running URL (Third Party Application URL) using  Http Post Action block.

And in Http post action block gives me JSON string if I use content type as text/json, application\json and Encoding US-ASCII, UTF-8 respectively.

I have referred few threads regarding JSON but it didn't help. Also checked the note to update the patch, but I am using latest version and patch.

Please help me solving this issue. Attached Json string for reference.

Accepted Solutions (1)

Accepted Solutions (1)

swaroop_anasane
Active Contributor

Hi Suresh,

Please add root node to entire json. JSON to XML converter expects it.

You can dynamically add this node to input as well by string concate.

Regards,

Swaroop

swaroop_anasane
Active Contributor
0 Kudos

In case of some special characters, youmay have to use encode, stringreplace and decode to make it a valid json.

Thanks,

Swaroop

Former Member
0 Kudos

Yes Swaroop, it was due to special character, did follow encode, string replace and decode.

Working now. Thanks.

swaroop_anasane
Active Contributor
0 Kudos

Great !!

Answers (0)