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

Fix RJSON's object parsing #2436

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

bobrippling
Copy link
Contributor

@bobrippling bobrippling commented Nov 27, 2023

Found in espruino/BangleApps#3114, object parsing exits early for strings with an empty object:

>JSON.parse('{"c":1}')
={  }

Or if we've parsed in a relaxed mode and hit a string, I'd expect us to exit with that object on hitting a string key, but I'm not sure how to enable the relaxed mode parsing from an espruino prompt.

Closes espruino/BangleApps#3114

@bobrippling bobrippling force-pushed the fix/rjson-obj-parsing branch from 6619532 to 4dd95bf Compare November 27, 2023 09:01
@gfwilliams
Copy link
Member

Thanks! Wow, sorry - that was a really stupid bug to introduce!

@gfwilliams gfwilliams merged commit 96f97e6 into espruino:master Nov 27, 2023
15 checks passed
@bobrippling
Copy link
Contributor Author

Thanks for the follow up too! I need to get setup for running locally, was flying blind with that one

@bobrippling bobrippling deleted the fix/rjson-obj-parsing branch November 27, 2023 21:42
@gfwilliams
Copy link
Member

:) No problem! If you're on Windows it's worth installing WSL - once that's installed, you can git clone it and it should 'just work' with make

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[owmweather] refreshing weather data fails with "Not OWM data"
2 participants