Posted: Tue Mar 08, 2016 7:28 am Post subject: URL is not generated while creating JSON messages.
Newbie
Joined: 08 Mar 2016 Posts: 4
Hi Guys,
I am trying to create a JSON message in which I need to map an URL to a JSON object. I am able to map an URL but the problem is all the forward slashes (/) are added with a backslash. For example,
set Outroot.JSON.Data.urn = 'ftp://think.co/world';
Not sure this is an issue.
How it is represented vs how it is used.
If you extract the URL in a java script, does it keep the backslashes or do you see it without them?
And by the way shouldn't you be using URL Encoding schema for this? _________________ MQ & Broker admin
The JSON specification states that forward slashes can be escaped with backslashes.
A fully compliant JSON parser will remove the backslash before parsing the value to the application.
So even though you have this in the JSON message:
Code:
"ftp:\/\/google.co\/world"
The application that parses the JSON will only see this:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum