IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Using item restrictions to escape special characters

    Posted Thu May 30, 2019 01:41 PM

    Originally posted by: MarieWallace


    I am using ITX to transform a huge CSV file into JSON. The file contains special characters (e.g. <VT>) that need to be escaped otherwise they will invalidate the JSON. I thought I could use Item Restrictions (Character/Exclude) to exclude special characters and replace them with the reference string, however this doesn't appear to work as I expected. It just marks the field as invalid, but doesn't do any mapping.

     

    Any help would be HUGELY appreciated. There may be another way to handle these escape characters, and I'm easy, as long as I can prevent them from corrupting my JSON.


    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender


  • 2.  Re: Using item restrictions to escape special characters

    Posted Mon June 03, 2019 04:16 AM
      |   view attached

    Originally posted by: PaulBrett


    Please find attached the simplest example of using a restriction list to replace certain characters.

    You will note that the 'TextItem root' object has the list, which includes the <VT> sequence.  My input data has the hex '0B' character in line #2

    screenshot

    My output line #2 is:

    'Input data%0Bline 2'

    The <VT> having been replaced with a URL encoded %0B as an example.

    Thank you.

    Paul

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender

    Attachment(s)

    zip
    VT_Escape.zip   2 KB 1 version


  • 3.  Re: Using item restrictions to escape special characters

    Posted Wed June 05, 2019 08:18 AM

    Originally posted by: MarieWallace


    Thanks so much for your help. This did the trick, I had gotten the strings in the wrong order. Much appreciated.


    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender