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 IndexWebSphere Message Broker SupportCreate model to Parse YAML data in IIB

Post new topicReply to topic
Create model to Parse YAML data in IIB View previous topic :: View next topic
Author Message
syedh2993
PostPosted: Tue Jun 19, 2018 10:47 am Post subject: Create model to Parse YAML data in IIB Reply with quote

Newbie

Joined: 19 Jun 2018
Posts: 1

Hi all,
I want to create message model to parse YAML data in IIB 9. How do I create YAML parser to parse the data?
Since YAML is superset of JSON I cannot use JSON parser right ?
Do I use DFDL parser to create schema then? if so how do I proceed ?
Back to top
View user's profile Send private message
abhi_thri
PostPosted: Wed Jun 20, 2018 12:24 am Post subject: Reply with quote

Master

Joined: 17 Jul 2017
Posts: 224
Location: UK

hi...yaml support is available for mapping nodes from 10.0.0.6 onwards, see infocenter topic

Quote:
Since YAML is superset of JSON I cannot use JSON parser right ?

Have you tried it? if so what was the result?
Back to top
View user's profile Send private message
martinb
PostPosted: Wed Jun 20, 2018 3:28 am Post subject: Reply with quote

Disciple

Joined: 09 Nov 2006
Posts: 194
Location: UK

Hi

IIB does not currently provide a YAML parser.

The IIB JSON parser does not require a message model.
Note the Graphical Data Mapper, which needs a model to visualize the data, can use a JSON schema, or Swagger document formatted in YAML - but the message data would be JSON, and the flow would use the IIB JSON parser.

While you could probably create a DFDL model to parse a specific YAML data structure, it would not be a good approach in my view.

You could consider having the YAML read into the message flow as BLOB data, then use a Java library, such as Jackson, to parse and construct a logical message tree etc.


Also you might consider opening a RFE to get YAML parser support added to IIB.
Back to top
View user's profile Send private message
timber
PostPosted: Wed Jun 20, 2018 3:29 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 868

@abhi_thri: You're correct that IIB can import a YAML file that specifies the OpenAPI/Swagger metadata for a REST API. But the OP is not trying to solve that problem. They are trying to parse a general-purpose YAML document in the same way that you might parse an XML or a JSON document.

@syedh2993: Not sure that DFDL would be the best solution for a format like YAML. IIB does not have a YAML domain but you could probably parse your YAML using the BLOB domain, then use a Java class library like Jackson to parse it. Or better, write yourself a plug-in parser for IIB and build a message tree from the parsed YAML.
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportCreate model to Parse YAML data in 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.