Thursday, 15 September 2011

groovy - Extract all particular field from JSON in mule esb -


I have this Jason Payload, I would like to collect all the external listing IDs in one shot -

< "" "{{"} ": {" Numfound ": 3," listing ": [{" status ":" INACTIVE "," pricePerTicket ": {" amount ": 100," currency ":" USD ", }, "Payment type" "" "" "" "": "" "" "" "" "" "" CID 1421798897102: 151681733 "," city ":" seattle "}}} }

I am using MVEL expression -

  & lt; Enricher target = "# [flowVars ['sata]]" source = "# [externalListingId in payload.listing]]" doctor: name = "message anchor" & gt; & Lt; Json: json-to-object-transformer returnClass = "java.util.hashMap" Doctor: name = "JSON for object" /> & Lt; / Enricher & gt;  

But this is giving the error !! - The message payload is of type: ReleasingInputStream.

Scenario - I want to convert all the external logging IDs into the flow, convert to the hamppop I have another CSV file as input, looks like a loop through that payload and check That's the map ID!

I am following this first post -

The payload needs to be changed in an object:

  & lt; Json: json-to-object-transformer return class = "java.lang.Object" /> Before  

Done , and remove one of the ones inside it.

You have to fix your mail, as listing is missing in the property:

  source = "# [payload.listings. Listing in the Listing listing]] " 

Source:


No comments:

Post a Comment