- From: Bob Wyman <bob@wyman.us>
- Date: Fri, 31 Mar 2023 18:05:42 -0400
- To: public-swicg@w3.org
- Message-ID: <CAA1s49UmDCzm+Gj0PjpHrdydp_wVqNJ9TONzZZZsfFUMwo+1hw@mail.gmail.com>
In a Mastodon.social post <https://mastodon.social/@bobwyman/110120087223817037>, I asked: XPath and JSONPath are similar, but different. (See JSONPath spec <https://goessner.net/articles/JsonPath/>) This presents a problem for me since I'm building a system to query ActivityStreams objects that can include HTML wrapped in JSON. Should I: - Use XPath syntax for both JSON and HTML? - Use JSONPath syntax for both JSON and HTML? (If so, is there a reasonable extension to JSONPath to support selecting on HTML attributes?) - Switch between JSONPath and XPath depending on the underlying datatype? (e.g. Embedding XPath in JSONPath.) If you were writing a query, would you accept needing to know both syntaxes? I would appreciate any advice you might be able to provide. Also, I would be interested to hear if anyone else has already been faced with and addressed this issue. bob wyman
Received on Friday, 31 March 2023 22:06:09 UTC