-
Notifications
You must be signed in to change notification settings - Fork 136
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
Use of array #75
Comments
Any way to do this that's not in an issue? Maybe not. If you need some sample parsing code, check out getIntCollectionFromJSON at https://github.com/nw2s/b/blob/b-1.1.0-unstable/sketches/libraries/nw2s/JSONUtil.cpp Hint: You need to know that element is an array and then treat it as such. Collections are different from simple values. They have values for methods that normally wouldn't make sense, namely getArraySize and getArrayItem. -s |
I did look but nothing jumped out.
However, as you can see from the first post there 7 digits after the decimal, and I could really do with using all of them not just 2. I thought I could parse as a string and then convert it to float, but parsing as string does not work. any idea? |
So you're saying that serial.println is only printing two decimal places? Before blaming the framework parsing, be sure that it's not the println formatting that's truncating the float. I can't see any more of the code that might or might not be contributing, so that's all I could guess. |
I have the following Json string
I can retrieve the bri values using
but i can't seem to work out how to get the parts 1 and 2 of the "xy" into a struct containing x and y as floats. could you point me in the right direction?
The text was updated successfully, but these errors were encountered: