on 05-10-2018 10:35 AM
Hi Team,
I'm working (PI 7.31 SP 20) on one scenario from Proxy to Rest, converting XML to JSON format.
Here i'm facing issue like we are not getting the double quotes for some field values where as getting double quotes for some values. because of this my request is failing at REST end.
Customer is asking to send one particular field in Double Quotes to overcome this issue(they are not expecting the double quotes for all fields).
Now i'm getting like this : "po_number":12345,"organization":9000,
Even i had tried with small UDF, but if i used this UDF i'm getting Double Quotes twice in JSON
UDF: return var1 = "''" + var1 + "''" ;
Result with the above UDF: "po_number":""12345"","organization":""9000"", which is not correct.
Now how can i pass a particular field value in double quotes. ?
My Requirement: "po_number":"12345","organization":"9000",
Regards,
P R.
Hi Manoj,
I have an issue with double quotes in my JSON payload in other way around.
We have a scenario to send a RAW text to REST service to obtain the session ID
As REST adapter supports unstructured text, we checked the boxes in REST adapter Data Format tab:-
Strip operation from the message,
Strip outer element
When we do the above we are getting the text payload with double quotes
"username=+++++++++&password=+++++++++++"
Without double quotes (") if we trigger it will work, but we are unable to remove those double quotes in PI
I hope you can help me to remove this double quotes using some functions.
Reiterating the issue:-
PI is sending the string with double quotes,but we don't want the double quotes
As we are passing string in the field, but we are looking for an option to remove "" (double quotes) when we send as an unstructured text
for example:
now = "username=+++++++++&password=+++++++++++" (we want an option to remove the double quotes (""))
expected as = username=+++++++++&password=+++++++++++
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manoj,
Thanks for the reply.
but i don't see such Custom XML/JSON Conversion Rules option in Rest Receiver Channel. I'm using PI 7.31 SP 20.
Can you please help me that where i can update the details in my version or any another way to resolve my issue?
BR,
P R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.