You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampipes.apache.org by "Dominik Riemer (Jira)" <ji...@apache.org> on 2022/11/17 17:52:00 UTC

[jira] [Closed] (STREAMPIPES-520) Implicit Casting to int by MQTT Adapter

     [ https://issues.apache.org/jira/browse/STREAMPIPES-520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dominik Riemer closed STREAMPIPES-520.
--------------------------------------
    Fix Version/s:     (was: 0.90.0)
       Resolution: Cannot Reproduce

> 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
>            Priority: Major
>         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.10#820010)