Announcement

Collapse
No announcement yet.

JSON listener - returning empty string

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • JSON listener - returning empty string

    I am trying to set up my first JSON listener. I've gone thru some old info and some current and landed with the attached channel. We are on Mirth 3.8.1. I keep getting this error:

    99: msg = JSON.parse(connectorMessage.getTransformedData());
    100: function doFilter() { phase[0] = 'filter'; return true; }function doTransform() { phase[0] = 'transformer'; logger = Packages.org.apache.log4j.Logger.getLogger(phase[0]);
    101:
    102:
    103: logger.info('test');
    LINE NUMBER: 99
    DETAILS: SyntaxError: Empty JSON string
    Here is my simple message that I am testing with using Postman. Any assistance or direction to other solutions is appreciated.

    {
    "name" : "Brad",
    "appt" : "12/12/19"
    }
    Attached Files
    SIG|1|Brad|Mirth Certified Interface Analyst^Cancer Treatment Centers of America

  • #2
    Works for me (no data returned) but I did have to set the data types all to JSON.

    -= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
    -= [email protected]
    -= Mirth Connect (Advanced)-certified
    -= Gold member of HL7.org
    -= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines

    Comment


    • #3
      Thanks - I swear I tried that, but that fixes the error inbound. Now on to phase II - HL7 outbound! I have some samples that I can start with for that.
      SIG|1|Brad|Mirth Certified Interface Analyst^Cancer Treatment Centers of America

      Comment


      • #4
        Sweet! Keep us updated!

        -= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
        -= [email protected]
        -= Mirth Connect (Advanced)-certified
        -= Gold member of HL7.org
        -= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines

        Comment

        Working...
        X