web stats
Mirth Community - View Single Post - Replacing a sequence of hex characters in preprocessor
View Single Post
Old 12-06-2012, 05:28 AM
Bostad Bostad is offline
Level 85 Channel Wizard
Join Date: Mar 2009
Location: Stratford Ontario
Posts: 712
Bostad is an unknown quantity at this point
Default Replacing a sequence of hex characters in preprocessor

Hi All;

I'm working with a kludgy delimited file and am having fits getting it parsed out properly.

Here's a snippet

"unitNumber": "H153734",
"accountNumber": "MA000715/11",
"name": "O'DWARF,ONE 00/100",
"filed by": "NUCAMC",
"filed by name": "CAMERON,CHRISTINE",
"OCANC.|8|": "20121001",
"OCANC11|20|": "Sandra James",
"OCANC25|15|": "8422182918",
"OCANC17|2|": "ON",
"OCANC127|1|": "Y",
"OCANC163|1|": "Y",
Looks like json doesn't it?

When I receive the file the actual delimiting sequence between fields is \x2C\x0D\x0A or ,\r\n

My issue is that Mirth will break on commas, even in a string that's wrapped with quotes.

My thinking is that this is because its in a second set of quotes on each line.

Has anyone encountered this issue before or have any suggestions as to how to solve it?

I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com

Test all my code suggestions prior to implementation
Reply With Quote