Query language? #28
Replies: 4 comments 4 replies
-
Yeah this is definitely something I've been thinking about too! I've mostly filed it under "just base it off something that works for XML", since most XML things should be conceptually compatible with KDL |
Beta Was this translation helpful? Give feedback.
-
Some prior art to look into: XML: XPath
cons:
CSS Selectors:
cons:
JSONPath:
cons:
==== |
Beta Was this translation helpful? Give feedback.
-
I got a bit nerd sniped by this and wrote up a query language and implementation in Kotlin on top of kdl4j. The impl needs a decent bit of testing before I'm comfortable sharing it, but I wrote up a somewhat incomplete doc on the syntax and semantics. It's currently in a branch on the kdl4j repo as I'm actively tweaking things there as I go along. The README is here. |
Beta Was this translation helpful? Give feedback.
-
For some reason, I missed/forgot about @hkolbeck-streem's query language, and ended up just speccing out my own: https://github.com/kdl-org/kdl/blob/main/QUERY-SPEC.md Sorry! :( Do folks have any thoughts on which they prefer? |
Beta Was this translation helpful? Give feedback.
-
If this thing takes off, and I hope it does, I'm eventually going to want a general purpose way to query or manipulate it (similar to XPath or
jq
). Is that something you would consider in line with your goals for this project? I realize that this is very early in the process and the significance of essentially asking if you want to design and maintain a whole extra grammar, documentation, reference implementation, etc. However, I thought it could be valuable to bring up the idea early in the process since it could influence design decisions or open up opportunities for outside contributions.Beta Was this translation helpful? Give feedback.
All reactions