I am looking to convert HL7 v2 (older EDI format) messages to JSON, so I could make them processable under Apache Drill and compressible under Parquet.
I looked into HAPI, but I am not having luck finding utility for non-XML HL7 to JSON conversion.
Does anyone have a suggestion or a reference to a library?
Just use HAPI to convert to XML. The code below requires Saxon, because the XML-to-JSON requires XSLT 2.0, but if you already have a method to convert XML to JSON, then you just need the first two lines, which are entirely HAPI. You should download the XSLT locally for production, of course. :-)
This creates output like this: