AnsweredAssumed Answered

JSON Splitting

Question asked by faisal.ali397074 on May 19, 2017
Latest reply on May 23, 2017 by RaphaelRivero

Hi

I have a JSON in a message shape set like the following (with a single quote around the full JSON as mentioned should be done for Boomi Messages)

 

'{
"empinfo": [{
      "eid": "1234567",
      "sid": "s1234567",
      "eml": "test@xyz.com"
},
{
      "eid": "2234567",
      "eml": "test2@xyz.com"
},
{
      "eid": "3234567",
      "sid": "s3234567"
}
]
}'


Can some please advise on how I would split this up into three documents that I can process seperately?

Do I need to adjust the JSON format ? this is a possibility

 

I have a tried a Data Process shape, and selected eid as the split element - but I still get this error:

Test execution ocompleted with errors. Embedded message: Unable to create JSON files from data, the document may not be well-formed json; Caused by: Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: com.boomi.util.io.FastByteArrayInputStream@6bb46ef2; line: 1, column: 2]

 

Basically the key value is the eid (every JSON object has this field) and this will be used at the filter for either email or sid UPSERT to the Successfactors ODATA USER entity.

Outcomes