Replies: 1 comment
-
|
See JsonPath Support for documentation of the propposed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The idea of
ArduinoJsonproviding support for a query language likeJsonPathhas been discussed several times in the past123, and sample code fragments/examples4 have been published.While full
JsonPathsupport would certainly be "nice", a small subset would be a great starting point.Any such query feature should not add bloat to the core code, but would be well suited to be implemented as part of a (
JsonPathor similar) utility class.A
JsonPathbranch should be created from[ArduinoJson/7.x](https://github.com/bblanchon/ArduinoJson/tree/7.x), to allow experimentation withJsonPath-related API design and implementation, providing a simple API allowing (non-compiled) to query aJsonDocument(orJsonVariant) instance.Rather than inventing a new/custom syntax, the query implementation should support a well-defined subset of
JsonPathsubset, returning aJsonVariant, or JsonArray of matching elements. An optionalfilterargument (like indeserializeJson() Filtering), would probably be useful to include as wellThe initial work of this
JsonPathsupport feature should focus on:JsonPathsupport API, allowing flexibility for future feature extension (e.g. compiledJsonPathqueries)JsonPathfeatures and/or API supportJsonPathsubset and API to target for an initial implementationI would be happy to contribute to any specification/implementation effort, but would like the above points to be settled before "breaking ground" on any implementation.
Let me hear your views!
Footnotes
JSONPath bblanchon/ArduinoJson#821 ↩
Function to resolve a JSON path composed of several keys bblanchon/ArduinoJson#1505 ↩
Concatenated Names bblanchon/ArduinoJson#1904 ↩
Concatenated Names bblanchon/ArduinoJson#1904
element.elementsupport fragment ↩Beta Was this translation helpful? Give feedback.
All reactions