You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature was requested several times, but I never implemented it because I could not find a satisfying API.
See this older answer for details.
The API you suggest makes sense, but it's too limited and is inconsistent with the existing filter["list"][0]["number"] = true, which includes all the elements.
Moreover, because ArduinoJson uses a dense array (as opposed to sparsed arrays), if a user sets filter["list"][100]["number"] = true, it allocates an array of 100 elements, which is quite a waste of RAM.
A better solution would be to use a query language as I suggested in #1486 (comment).
I'm not against the idea, but I'm afraid this will be a huge work with very little return, and the executable would inflate significantly.
We could also use a predicate instead of a query or filter.
This could be as powerful as the query language but wouldn't require a new parser and keep the code small.
I had this idea on the back of my head for a long time, but I couldn't figure out an intuitive API.
Hi Benoit, thanks for the detailed reply.
I understand your points, and will look at the deserialization in chuncks technique.
Thanks again for your great work on this library !
Would it be possible to filter a number of occurence on a list to reduce further the data size for APIs which don't support pagination ?
For example this JSON:
filtered with something like:
filter["list"][2]["number"] = true;
would result in:
The text was updated successfully, but these errors were encountered: