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 » JSON String As Request - IIB

Post new topic  Reply to topic
 JSON String As Request - IIB « View previous topic :: View next topic » 
Author Message
vnb
PostPosted: Tue Jan 16, 2018 12:22 pm    Post subject: JSON String As Request - IIB Reply with quote

Newbie

Joined: 16 Jan 2018
Posts: 4

Is there a way to send JSON String as a request in IIB. Normally we have to initiate JSON Object or JSON Array. But we have a requirement where the providers can accept only JSON String as a request.

Set OutputRoot.JSON.Data.id = request.xxxx; (This is JSON Object)
We are looking for not a JSON Object and not key values pairs. Just like a string below...

Request
----------
"xxxx-1234-abcd-xxxx"
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 16, 2018 12:34 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

How does a JSON string differ from a normal string?

Or.....

If you don't want a JSON Array or a JSON Object why are you using the JSON domain?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vnb
PostPosted: Tue Jan 16, 2018 12:53 pm    Post subject: Reply with quote

Newbie

Joined: 16 Jan 2018
Posts: 4

Actually we have one requirement, where the providers accepting string as json without any key and they are responding in JSON format. In their documentation they clearly defined do not send JSON Object and send string only.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jan 16, 2018 1:00 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

vnb wrote:
Actually we have one requirement, where the providers accepting string as json without any key and they are responding in JSON format. In their documentation they clearly defined do not send JSON Object and send string only.


Awesome. How does that address either of my questions? Also you now need to answer this for me:

vnb wrote:
the providers accepting string as json without any key


This is presumably the
Code:
xxxx-1234-abcd-xxxx
in your original post. How is this in any way a JSON format?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vnb
PostPosted: Tue Jan 16, 2018 1:40 pm    Post subject: Reply with quote

Newbie

Joined: 16 Jan 2018
Posts: 4

For your question: The documentation says that they are accepting either request/response in json format. That is the reason I am trying to achieve using JSON Domain.

My Thought is xxxx-1234-abcd-xxxx??
Can we consider this a JSON as a string format??
Back to top
View user's profile Send private message
timber
PostPosted: Tue Jan 16, 2018 2:30 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
Can we consider this a JSON as a string format??

Wouldn't it be easier to check the JSON specification, instead of asking us? It's available here: https://www.json.org/

If it does not conform to the JSON spec then it is not JSON.
Back to top
View user's profile Send private message
vnb
PostPosted: Tue Jan 16, 2018 2:54 pm    Post subject: Reply with quote

Newbie

Joined: 16 Jan 2018
Posts: 4

The specification says no, but we can achieve those kind of scenario's using Java API's. I would like to check here, similar kind of ways exists any??

Nothing wrong with that??
Back to top
View user's profile Send private message
adubya
PostPosted: Wed Jan 17, 2018 1:25 am    Post subject: Reply with quote

Partisan

Joined: 25 Aug 2011
Posts: 377
Location: GU12, UK

I can only speak for myself but I have no idea what you're asking us.

Give examples of the exact data you'd send to your provider and the exact data you'd get back.

If it were JSON then a request would be something like

Code:

{
   'request': {
      'repeatingStructure': [{
            'childElement': 'element value',
            'anotherChildElement': 12345
         }
      ]
   }
}


What would your request look like ?
_________________
Independent Middleware Consultant
andy@knownentity.com
Back to top
View user's profile Send private message Send e-mail
timber
PostPosted: Wed Jan 17, 2018 5:16 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
The specification says no, but we can achieve those kind of scenario's using Java API's
I agree with adubaya - you are making no sense at all. What Java APIs are you talking about? Are they JSON APIs or something else?

IIB can construct any string of characters you want - but the JSON domain will only read and write valid JSON.
Back to top
View user's profile Send private message
souciance
PostPosted: Wed Jan 24, 2018 12:54 am    Post subject: Reply with quote

Disciple

Joined: 29 Jun 2010
Posts: 169

vnb wrote:
For your question: The documentation says that they are accepting either request/response in json format. That is the reason I am trying to achieve using JSON Domain.

My Thought is xxxx-1234-abcd-xxxx??
Can we consider this a JSON as a string format??


No, this is not JSON. Why don't you ask the consumer to provide an example message instead? That would make easier for you and for us to help.
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 » JSON String As Request - IIB
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.