IBM Sterling Transformation Extender

 View Only
  • 1.  XSD to JSON

    Posted Tue August 29, 2023 04:22 PM

    Hi, I have type tree which creates XML. I tried to create sample data for the group. But it is timing out. Also I tried to create Json group for that group. But I am getting below error. 

    An internal error occurred during: "Generate Sample Data".

    java.lang.StackOverflowError

    basically I need to create Json structure for XML group with same structure. Any leads?



    ------------------------------
    Srinivasulu Talapaneni
    ------------------------------


  • 2.  RE: XSD to JSON

    Posted Tue August 29, 2023 06:15 PM

    The only way I know how to create a JSON template out of XML is to use Design Server.  V10.1.2 (latest version) should have that feature.  It's done in a flow where XML to JSON transformation is done by a node/service.

    Design Server is available for Windows or Linux container.   There should be a video to walk you through the installation in Paul Brett's Youtube channel Paul Brett IBM

    YouTube remove preview
    Paul Brett IBM
    Hints, Tips and Breaking News for the IBM Transformation Extender product from IBM
    View this on YouTube >



    ------------------------------
    Rex Chan
    ------------------------------



  • 3.  RE: XSD to JSON

    Posted Wed August 30, 2023 05:19 AM

    Thank You Rex. Will try



    ------------------------------
    Srinivasulu Talapaneni
    ------------------------------



  • 4.  RE: XSD to JSON

    Posted Wed August 30, 2023 08:47 AM
    Edited by Srinivasulu Talapaneni Wed August 30, 2023 10:19 AM

    Hi Rex,

    DO we have any function / a way to convert xml to JSON in Wtx / ITX.

    Like we have TextToBase64 function or do we have any Run function that we can use?

    Basicallly I should be able to use same funtion / method to convert both below xmls to corresponding JSON's

    <ISF>

          <Name>Srini</Name>

          <Country>India</Country>

    </ISF>

    or 

    <Packet>

            <Date>2023-01-01</Date>

            <Time>23:50</Time>

    </Packet>

    Thanks,

    Srini.



    ------------------------------
    Srinivasulu Talapaneni
    ------------------------------



  • 5.  RE: XSD to JSON

    Posted Wed August 30, 2023 11:37 AM

    There is no XML to JSON or JSON to XML conversion in ITX map.  It's only available in ITX Flow Server as a node.

    Design Server must be used to create the flow.  The node is called Format Converter.  Input or Output supported are CSV, XML and JSON.



    ------------------------------
    Rex Chan
    ------------------------------



  • 6.  RE: XSD to JSON

    Posted Thu August 31, 2023 06:50 AM

    Thank You Rex. this option is not available in ITX 9.*. Need to try this in newer version.



    ------------------------------
    Srinivasulu Talapaneni
    ------------------------------



  • 7.  RE: XSD to JSON

    Posted Wed August 30, 2023 02:41 PM

    Hi Srinivasulu,

    Sometimes it happens that you can't do everything in ITX itseld and you need some help from external tools.  Liquid Studios has a tool where you can create XSD schemas from sample XML and then you can take that resulting XSD and create a Json Schema from there to get a simliar Json structure as your XML data.  These resulting XSD/Json schemas can then be imported to create type trees or used as is in your mapping projects.  This is handy if you don't need or want to transform that data on the fly - but just be able to have your data represented in multiple formats.

    Liquid Studio does have a Community (free) version - however I highly recommend the purchase if you can swing it.  It is a great tool to aid your transformation data journey.

    Hope this helps!



    ------------------------------
    Lisa Edwards
    Software Engineer / Subject Matter Expert
    Rainbow Data Systems, Inc
    ------------------------------



  • 8.  RE: XSD to JSON

    Posted Thu August 31, 2023 06:42 AM

    Thank You Lisa.



    ------------------------------
    Srinivasulu Talapaneni
    ------------------------------