Home Forums Integration Messages Suspect a bug: Getting exceptions on parsing valid json with null/blank values.

Viewing 5 reply threads
  • Author
    Posts
    • #8673
      Ben FrandoBen Frando
      Participant

      Exception thrown when parsing null/blank values:

      executing: (parse-message “{\”status\”:{}}” “testMsg”)

      exception: Caused by: nexj.core.scripting.ParserException: Unexpected token “}”. (err.parser.unexpectedToken)

      testMsg.message: attached

      =============================

      The following parses fine:
      executing: (parse-message “{\”status\”:{\”code\”:200,\”reason\”:\”ok\”}}” “testMsg”)

      ; #<TO<testMsg, @1757836584>(

      status=TO<testMsg, @1026935509>(

      reason=”ok”,

      code=200

      )

      )>

      0
    • #8680
      Ben FrandoBen Frando
      Participant

      testMsg.message:

      <Message aggregation=”random” format=”JSON” lax=”true”>
      <Parts>
      <Message aggregation=”random” lax=”true” name=”status”>
      <Parts>
      <Value name=”code” type=”integer”/>
      <Value name=”reason” type=”string”/>
      </Parts>
      </Message>
      </Parts>
      </Message>

      0
    • #8687
      Ed ShawEd Shaw
      Keymaster

      Ben, you are totally right. This is a bug. The good news is that is is already squashed. 🙂 What version are you running? I ran your tests on the latest and got the following results.

      0
    • #8703
      Ben FrandoBen Frando
      Participant

      It’s 6.1.1.14 – Opal SP1 HF14

      0
    • #8710
      Ed ShawEd Shaw
      Keymaster

      This was fixed, I believe, in Jade.  For sure in Ruby.

      0
    • #8723
      Ben FrandoBen Frando
      Participant

      Thanks!

      0
Viewing 5 reply threads
  • You must be logged in to reply to this topic.