Bob Wyman on Nostr: Question for Geeks: XPath and JSONPath are similar, but different. That presents a ...
Question for Geeks:
XPath and JSONPath are similar, but different. That 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?
- Use either JSONPath and XPath depending on underlying datatype?
If you were writing a query, would you accept needing to know both syntaxes?
npub177x40845gmz06jsrpkqvrww3skwn6yj2cx2xk6ynzakn5xr7j72suzpv55 (npub177x…pv55) npub1u27r9h3j9pvrplaffsmpn698e8xhmuqhdgcxldv67ammql9pumnqha3qfq (npub1u27…3qfq)
See: JSONpath: https://goessner.net/articles/JsonPath/
XPath and JSONPath are similar, but different. That 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?
- Use either JSONPath and XPath depending on underlying datatype?
If you were writing a query, would you accept needing to know both syntaxes?
npub177x40845gmz06jsrpkqvrww3skwn6yj2cx2xk6ynzakn5xr7j72suzpv55 (npub177x…pv55) npub1u27r9h3j9pvrplaffsmpn698e8xhmuqhdgcxldv67ammql9pumnqha3qfq (npub1u27…3qfq)
See: JSONpath: https://goessner.net/articles/JsonPath/