Comments (6)
I concur …. see my post
http://forum.arduino.cc/index.php?topic=172578.new#new http://forum.arduino.cc/index.php?topic=172578.new#new
Thanks so much for such a great job.
AC/.
On 09 Jan 2015, at 18:15, Peter Polidoro [email protected] wrote:
You have written a great library, thank you so much! Your code in version 4 looks really clean, I am impressed. It seems that now the JSON parser only operates in what you were calling strict-mode in your previous version. Now if the JSON is not well formed it returns an error instead of parsing in a non-strict manor. Would you consider replacing the original non-strict parsing behavior? Perhaps that would ruin the cleanliness of your new code and it is not reasonable to expect a JSON parser to handle ill formed strings, but I did think it was really nice when your previous code gracefully accepted what now it simply rejects. Previously it seemed that strings inside the JSON did not necessarily need quotation marks, and tokens could be separated with spaces as well as commas. Perhaps even more was allowed through the old non-strict parser that other more strict parsers would reject. I am using your library to parse JSON that I type on a command line and your previous non-strict ve rsion saved me from having to type lots of characters that I now need to add. Perhaps I am being lazy and sloppy, but would you please consider restoring the old behavior, at least as an option?
—
Reply to this email directly or view it on GitHub #44.
from arduinojson.
Thank you guys
I do make an effort to make the code clear and well tested.
But what I care even more is the code size.
When writing version 4, I first tried to keep that feature, but I finally removed it because it was much simpler without it and allowed more code reuse.
I'll have a look but even if I manage to do it, the code will be significantly bigger so that'll be an optional feature.
from arduinojson.
Perhaps it is better to keep version 4 nice and small. I can just continue to use version 3 for non-strict parsing. Or maybe you can consider adding a non-strict parsing git branch to version 4, so only those who really want that feature have all the extra code. Maybe that is too much for you to have to maintain though. Thanks for looking at it!
from arduinojson.
I think I'll add a new function to sanitize the JSON string before parsing.
You'll have to call that function yourself, like this:
char json[64] = "{key:value}";
sanitizeJson(json, sizeof(json));
JsonObject& root = jsonBuffer.parseObject();
That way the overhead will only be included if you need the non-strict mode but it would have zero impact for programs that don't need it.
Would that be suitable for you guys?
from arduinojson.
That would be great! Thanks!
from arduinojson.
Feature available in ArduinoJson 5.0 beta 2.
from arduinojson.
Related Issues (20)
- ArduinoJson 7 reserve memory pool HOT 6
- help delay with webserver HOT 1
- Using ArduinoJSON in ESP-IDF HOT 2
- Help on optimization HOT 5
- allocate memory on SDRAM HOT 1
- DynamicJSONDocument as Template Parameter HOT 2
- [7.0.0] Using JsonVariantConst causes "no matching function" error HOT 3
- Migrating createNestedObject to V7 HOT 1
- [Fresh migration from V6] CollectionIterator crash HOT 7
- Error with timestamp HOT 3
- Getting EmptyInput from deserializeJson when using external json file opened with LittleFS HOT 4
- Does not compile on any ESP8266
- ArduinoJson 7 uses ~30 kb more stack on Teensy 4.1 HOT 4
- Need some help extracting from a payload
- `volatile bool` serialized as `1` or `0` instead of `true` or `false` HOT 4
- Losing const char* data while using doc["fileName"].set(cFileName); HOT 5
- Compiler Fehler HOT 1
- Broken link in a given error. HOT 1
- `CappedAllocator` for ArduinoJson 7 HOT 4
- Switching from ArduinoJson 6 to 7 leads to a random assertion failure at runtime: `const VariantPoolList.hpp:98 (poolIndex < count_` HOT 10
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 arduinojson.