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.  JSON parse problem

    Posted Fri September 19, 2025 09:14 AM

    Hi everyone,

    I'm facing a problems trying to parse a JSON that has a double quotes inside the the value's field.
    An example: {"myField": "myVal"ue"}

    This JSON string  goes inside a SOAP(XML) element like below:
    <Body>
        <myNode>
            <element1>someData123</element1>
            <element2>{"myField": "myVal"ue"}</element2>
        </myNode>
    </Body>

    Searching in the community's tread discussions, I didn't find any solution that handle with a problem of this kind.
    How did you deal with a problem like this?

    Context: We are dealing with this problem in the middleware layer (ACE) because, both sender and receiver systems are legacy and share functions between projects. So they don't want to deal with it, in the sender and receiver, because if something happens, it could spread problems worldwide.



    ------------------------------
    --------------------
    -- Hi, i'm David ! --
    --------------------
    ------------------------------


  • 2.  RE: JSON parse problem

    Posted Mon September 22, 2025 04:31 AM

    Hello, dear David,

    Unfortunately, your description doesn't specify where and how (Java/C++) you are reading or want to read the JSON. Aren't the quotes escaped?



    ------------------------------
    David Honisch
    ------------------------------



  • 3.  RE: JSON parse problem

    Posted Tue September 23, 2025 12:18 PM

    Hello, Honisch,

    1. "[...] quotes escaped?": Unfortunelly the data extract function, from the sender system, somehow extract the description`s text from the product without add an escape.
    2. "[...] where and how [...]": we are only allowed to use ESQL (Database/Compute node) and the other native nodes to make any kind of transformation and routing inside ours interfaces inside ACE.
    3. "[...] you are reading or want to read the JSON. [...]": Originally, the interface works like a broker and fowarded the mesage to the backend. But, we now are facing this problem, and trying to use the ACE to solve de quotes inside the JSON string value's field. With this in mind, i've been working in two ways:

    • Use the ACE's JSON Parse to deal with the quote. (does not work)
    • Write a function that search by "unexpected" quotes inside the JSON string, then add an escape before then. (works fine)

    The main reason to open this thread is, there are a more simple way to not do the second option ?



    ------------------------------
    David Fornazier
    ------------------------------



  • 4.  RE: JSON parse problem

    Posted Wed September 24, 2025 02:43 AM

    Hello David

    Definitly the JSON received in your xml attribute is NOT json. Sender must fix this format because there is no other option



    ------------------------------
    D@viiid
    ------------------------------



  • 5.  RE: JSON parse problem

    Posted Wed September 24, 2025 07:09 AM

    Hi, dear David,

    sorry, i didn't see that you'd sent an example. With a non-escaped quote within quotes, you're obviously lost.
    In that case, the sender should actually format and validate their SOAP services properly, because I couldn't build a reliable replace function for that case.



    ------------------------------
    David Honisch
    ------------------------------



  • 6.  RE: JSON parse problem

    Posted Wed September 24, 2025 01:46 PM

    Hi, Honisch and D@viiid,

    Thanks for the effort and the help in this thread. Unfortunately we still using the unreliable function solution for this case, waiting the response from the Sender and Receiver system managers.



    ------------------------------
    David Fornazier
    ------------------------------



  • 7.  RE: JSON parse problem

    Posted Thu September 25, 2025 03:38 AM

    Good Morning, dear David,
    i hope the service will be fixed soon so that you can also consume valid XML MIME type documents.
    Best regards
    David



    ------------------------------
    David Honisch
    ------------------------------