on 04-20-2016 9:46 AM
Dear experts:
There are three scenarios when we want to convert the internal tables to arrays in JSON:
1) Contain more than one row in array; 2) Contain exactly one row in array; 3) Empty array.
Case 1 is correct default; and case 2 can be solved after apply note 2175218 and configure the rest adapter reference to Vadim Klimov's blog
In case 3, our expect result should be:
"ET_LIST": {
"item": []
}
The default result will be:
"ET_LIST": ""
Of course we can use node functin "createIf" to create the node "item" in message mapping whether the internal table contain data, but the converted result will be:
"ET_LIST": {
"item": [""]
}
I really don't know how to remove these quotes in []...
_LIST": {
"item": []
}
"ET_LIST": {
"item": []
}
Hi Zhang,
You can handle this using custom XML/JSON handling and null string tab in your receiver REST CC.
Can you please paste screen shot of your channel so that I can help you specifically.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AS part of JSON standard "" represents the valid syntax for xml element which is appearing like
<value></value> JSOn will be "value":[""] (Assuming this is array object.
if you have xml tag as <value/> it should not show "" as tag itself is not appearing.
can you paste your right xml which you are getting because in xml which you have </item> is not valid.
<item></item> has null value thats why you are getting "" in JSON, in your cc configuration uncheck "treat null as string" and see if that works else then RFC should not send any value in item, not even blank then <item/> will appear.
bottom line for every element value in XML be it null or empty if element <item></item> occurs you will get "".
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.