ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » URL is not generated while creating JSON messages.

Post new topic  Reply to topic
 URL is not generated while creating JSON messages. « View previous topic :: View next topic » 
Author Message
nr.prajeesh
PostPosted: Tue Mar 08, 2016 7:28 am    Post subject: URL is not generated while creating JSON messages. Reply with quote

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';

Output :
{"urn":"ftp:\/\/google.co\/world"}

can someone please me to fix this issue ?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Mar 08, 2016 8:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

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
Back to top
View user's profile Send private message Send e-mail
stoney
PostPosted: Tue Mar 08, 2016 9:31 am    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

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:

Code:
"ftp://google.co/world"
Back to top
View user's profile Send private message
nr.prajeesh
PostPosted: Sat Mar 19, 2016 10:01 pm    Post subject: Reply with quote

Newbie

Joined: 08 Mar 2016
Posts: 4

Thank you friends for the valuable suggestions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » URL is not generated while creating JSON messages.
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.