Comments (7)
In the JSON notation there is no differentiation like float or integer only the number data type exists which is used for both (details for the number type are here www.json.org). Therefore a style like { "hue": 255.00000 } is valid JSON format and logical equal to { "hue": 255 }.
However it's true that the mentioned parameter values never have a fractional numeric part and hence such numbers should be written in a interger like style.
from deconz-rest-plugin.
Hi Manuel,
Thanks for responding and you are right but the returned floats do screw-up dot.net deserialisation :-(
Regards, Willem.
On 06 Dec 2013, at 20:49, Manuel Pietschmann [email protected] wrote:
In the JSON notation there is no differentiation like float or integer only the number data type exists which is used for both (details for the number type are here www.json.org). Therefore a style like { "hue": 255.00000 } is valid JSON format and logical equal to { "hue": 255 }.
However it's true that the mentioned parameter values never have a fractional numeric part and hence such numbers should be written in a interger like style.
—
Reply to this email directly or view it on GitHub.
from deconz-rest-plugin.
I will change the JSON serializer to use intereger style if a number has no fractional part - it's a one-liner, hopefully afterwards the .NET deserializer works again.
Regards, Manuel.
from deconz-rest-plugin.
Cheers mate ...
On 06 Dec 2013, at 21:03, Manuel Pietschmann [email protected] wrote:
I will change the JSON serializer to use intereger style if a number has no fractional part - it's a one-liner, hopefully afterwards the .NET deserializer works again.
Regards, Manuel.
—
Reply to this email directly or view it on GitHub.
from deconz-rest-plugin.
Indeed oneliner, just changed it and it works fine now ....
On 6 Dec 2013, at 21:03, Manuel Pietschmann [email protected] wrote:
I will change the JSON serializer to use intereger style if a number has no fractional part - it's a one-liner, hopefully afterwards the .NET deserializer works again.
Regards, Manuel.
—
Reply to this email directly or view it on GitHub.
from deconz-rest-plugin.
Cool, nice that it works now. I've changed the JSON output to not use fractional style for integer numbers 77a4c97.
from deconz-rest-plugin.
Closing the oldest issues for know to tidy up the tracker and duplicates in newer issues.
from deconz-rest-plugin.
Related Issues (20)
- v2.27.0 is crashed on macOS 14.5 during pairing HOT 1
- Tuya Scene Switch TS0044 TZ3000_a4xycprs upload DDF in DECONZ 2.27.0 HOT 1
- Ikea Starkvind (air purifier) not providing the status thru REST-API after DECONZ update to v2.27.0-beta HOT 28
- Lost device after updating to 2.27 HOT 9
- Selected lines in OTA Update became blank HOT 4
- mmWave sensor is recognized simultaneously as a sensor and a smart plug HOT 4
- DDF Policy `raw_json` still display an `ddf_hash` HOT 5
- Philips RWL021 does not work since update to v2.27.0 HOT 30
- Tuya Motion Sensor Model ZG-204Z HOT 3
- Philips Hue Wall Switch does not work since update to v2.27.0 HOT 45
- Tuya Combustible Gas sensor HOT 6
- Zigbee Smart Remote Controller -Y HOT 12
- Schneider Electric Room Thermostat HOT 15
- Tuya Soil Sensor (diff. manufacturer) HOT 8
- `file_hash` got outside the descriptor
- Hue Tap Dial rotation not registered by Home Assistant HOT 19
- Tuya Water Leak Sensor - ZW06 HOT 9
- Deconz Docker Image - Firmware Not Connected HOT 1
- GreenSun Smart Socket HOT 3
- Conbee III in Raspi/Portainer enviroment not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deconz-rest-plugin.