App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Applicationintegration
#App Connect
#AppConnect
 View Only
  • 1.  IIB JSON parser adding special character while writing to MQ

    Posted Wed June 03, 2020 05:30 AM
    I have a flow where I get JOSN data from a HTTP Input node. I store the JSON data in Environment variable.
    Code:
    CREATE LASTCHILD OF Environment DOMAIN ('JSON') FROM InputRoot.JSON;


    Later in the code I create a output from the environment variable and put to a file as well to a MQ Queue.
    Code:
    SET OutputRoot.JSON = Environment.JSON;


    The JSON data has a date field as String.
    Code:
    "startDate": "06/01/2020"


    The file gets created with proper JSON data but the MQ message has extra special character for the date field.
    Code:
    startDate="06\/01\/2020"


    I am not getting the reason why the MQ message get special characters around the "/".

    Any suggestion.


    ------------------------------
    Partha Baidya
    Bangalore

    ------------------------------


  • 2.  RE: IIB JSON parser adding special character while writing to MQ

    Posted Wed June 03, 2020 05:28 PM
    Edited by Martin Boag Thu June 04, 2020 07:31 AM
    The JSON specification, JSON.org  states that forward slash, "solidus" can be escaped.

    By default the IIB/ACE JSON serializer does escape forward slash, hence it is expected that your '/' become '\/' in the JSON output.

    However IIB/ACE does provide a JSON configuration parameter "escapeMode" which can be set to change this behavior. Please see Parameter values for the JSON parser

    ------------------------------
    Martin Boag
    Software Developer
    IBM
    ------------------------------



  • 3.  RE: IIB JSON parser adding special character while writing to MQ

    Posted Wed June 03, 2020 08:32 PM
    Edited by Partha Baidya Wed June 03, 2020 08:35 PM
    Thanks a lot Martin for replying. The fix is working as per your suggestion.

    Regards,
    Partha