Dominick Madden created STREAMPIPES-520:
-------------------------------------------

             Summary: Implicit Casting to int by MQTT Adapter 
                 Key: STREAMPIPES-520
                 URL: https://issues.apache.org/jira/browse/STREAMPIPES-520
             Project: StreamPipes
          Issue Type: Bug
          Components: Connect
            Reporter: Dominick Madden
             Fix For: 0.68.0
         Attachments: image-2022-03-30-17-13-33-966.png, 
image-2022-03-30-17-18-39-028.png, image-2022-03-30-17-26-16-617.png

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.

 
h1. Test 1

Published message:
{noformat}
{
    "test": 1.0,
    "test_2": 1.00000000000000000000001,
    "test_3": "1.0",
    "test_4": 1,
    "test_5": 0.999999999999999999999}
}{noformat}
Output of the MQTT Adapter (Connected to a Dashboard Sink):

!image-2022-03-30-17-18-39-028.png!

 
h1. Test 2

Message:
{noformat}
{
    "test_15": 1.000000000000001,
    "test_16": 1.0000000000000001
}{noformat}
Result:

!image-2022-03-30-17-26-16-617.png!

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to