on 10-16-2018 7:24 PM
Hi,
I need modify the name of tag after Json conversion in SAP PI 7.31
In the XML the tag name is <AF1>, <AF2>…. But in Json the tag is “1”, “2”….
XML does’nt work the tag with a number (<1>, <2>…)
XML:
<userid>123456</userid>
<email>test@test</email>
<password>123456789</password>
<additional_fields>
<AF1>Campo 1</AF1>
<AF1>Campo 2</AF2>
</additional_fields>
Converted JSON:
{"userid":"123456",
"email":"test@test",
"password":123456789,
"additional_fields":
{
"AF1":"Campo 1",
"AF2":"Campo 2"
},
}
expected JSON:
{"userid":"123456",
"email":"test@test",
"password":123456789,
"additional_fields":
{
"1":"Campo 1",
"2":"Campo 2"
},
}
Is there any way to change the tag name after generating Json? or create a tag with a number in tag name in the XML?
Hi,
The solution is add in Communication Channel the check box "Remove escaped name start character" and add "Escape sequence" "AF". Added print.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.