Uploaded image for project: 'StreamPipes'
  1. StreamPipes
  2. STREAMPIPES-520

Implicit Casting to int by MQTT Adapter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • None
    • None
    • Connect
    • None

    Description

      When connecting an MQTT Adapter to a broker and the data is a JSON object the data is implicitly cast from float to int when it would round down (or up) to an int.

       

      Test 1

      Published message:

      {
          "test": 1.0,
          "test_2": 1.00000000000000000000001,
          "test_3": "1.0",
          "test_4": 1,
          "test_5": 0.999999999999999999999}
      }

      Output of the MQTT Adapter (Connected to a Dashboard Sink):

       

      Test 2

      Message:

      {
          "test_15": 1.000000000000001,
          "test_16": 1.0000000000000001
      }

      Result:

       

      Attachments

        1. image-2022-03-30-17-13-33-966.png
          5 kB
          Dominick Madden
        2. image-2022-03-30-17-18-39-028.png
          6 kB
          Dominick Madden
        3. image-2022-03-30-17-26-16-617.png
          5 kB
          Dominick Madden

        Activity

          People

            Unassigned Unassigned
            doemski Dominick Madden
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: