on 2019 Jun 21 9:24 AM
Hi,
I am passing following XML to the XML to Json converter:
<ns1:AddressCurationResponse xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
<CurationInformation>
<item>
<Changes>
<item>
<ACTION>xyz</ACTION>
<FIELD>xyz</FIELD>
<MESSAGE>xyz</MESSAGE>
</item>
<item>
<ACTION>xyz</ACTION>
<FIELD>xyz</FIELD>
<MESSAGE>xyz</MESSAGE>
</item>
</Changes>
<PostalAddress>
<CityName>xyz</CityName>
<DistrictName>xyz</DistrictName>
</PostalAddress>
<Rating>
<SCORE>1</SCORE>
<ACCURACYINDICATOR>1</ACCURACYINDICATOR>
<CURATIONLEVEL>1</CURATIONLEVEL>
</Rating>
</item>
</CurationInformation>
</ns1:AddressCurationResponse>
Now I want the converter to force output the element ns1:AddressCurationResponse/CurationInformation/item as a json array with [] instead of {}.In the converter there is the option to use json streaming:
But upon saving, its telling me that the table should not be empty:
What am I missing?
The same question was also asked here, but the solution was not shown unfortunately:
https://answers.sap.com/questions/12689222/get-xml-element-in-json-array-using-xml-o-json-con.html
Hi Filipe,
I tried with the given XML and below is the output from XML-JSON converter.I had the same error of "Table may not contain empty rows" , i still went and deployed the Iflow . Just close the iflow and reopen it ,the error disappears.
And note as you are explicit mentioning XML to JSON conversion via enabling streaming option , make sure you mention the other paths as well which need to be and array to form a valid JSON in . In you case for the above payload even : / AddressCurationResponse/CurationInformation/item/Changes/item
also needs to be an array.
Converter:
OutPut:
{"AddressCurationResponse":{"CurationInformation":{"item":[{"Changes":{"item":{"ACTION":"xyz","FIELD":"xyz","MESSAGE":"xyz"},"item":{"ACTION":"xyz","FIELD":"xyz","MESSAGE":"xyz"}},"PostalAddress":{"CityName":"xyz","DistrictName":"xyz"},"Rating":{"SCORE":"1","ACCURACYINDICATOR":"1","CURATIONLEVEL":"1"}}]}}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Both,
you are right. This is just a display bug.
Thanks a lot for your prompt feedback!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Filipe
I've encountered it before and I think that is a false error. Try saving, then exit the IFlow ignoring the error. Then when you reopen the IFlow, the error would no longer be there. Try deploying the IFlow then and test it with a message.
Regards
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
11 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.