Git Product home page Git Product logo

Comments (7)

manup avatar manup commented on August 16, 2024

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.

willem4ever avatar willem4ever commented on August 16, 2024

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.

manup avatar manup commented on August 16, 2024

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.

willem4ever avatar willem4ever commented on August 16, 2024

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.

willem4ever avatar willem4ever commented on August 16, 2024

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.

manup avatar manup commented on August 16, 2024

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.

manup avatar manup commented on August 16, 2024

Closing the oldest issues for know to tidy up the tracker and duplicates in newer issues.

from deconz-rest-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.