Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert long to double #64

Closed
wants to merge 2 commits into from
Closed

Conversation

firepick1
Copy link

Benoit,

Many thanks for ArduinoJson. I intend to use it in FirePick Delta for CNC motion control adopting a JSON style of interaction modeled after TinyG. I do very much like your library. For larger projects I use Jansson, but your library is excellent for Arduino with its smaller footprint.

On a minor note, I made a small modification that you may or may not want. I convert long to double automatically. For me this simplifies my code so that I can deal with numbers as double regardless. I'm happy working off my fork--that's the only thing I had to change. I know that it's a slippery slope doing this type of "nice conversion." In this case, I found it worthwhile on the client side. The alternate solution is to provide a new utility method (e.g., asNumber()). After careful consideration, I chose this as less invasive of the API.

Anyhow, thanks for ArduinoJson!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.17%) to 94.38% when pulling 73c4b0b on firepick1:master into ca9d606 on bblanchon:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.17%) to 94.38% when pulling 73c4b0b on firepick1:master into ca9d606 on bblanchon:master.

@bblanchon
Copy link
Owner

This is actually a good feature.
However, I'm always careful when increasing the size of ArduinoJson because it may break existing code.
I think I'll include your patch in ArduinoJson 5.0 that I want to me more tolerant to non standard input.

@firepick1 firepick1 closed this Apr 26, 2015
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.52%) to 94.02% when pulling bc8c3d9 on firepick1:master into ca9d606 on bblanchon:master.

bblanchon added a commit that referenced this pull request Aug 10, 2015
Repository owner locked and limited conversation to collaborators Sep 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants