Hacker News new | ask | show | jobs
by jmakeig 4893 days ago
Parsing and accessing are two different tasks. Even if you have an entire JSON (or XML) data structure in memory, getting to the right pieces can be difficult. “Return all of the order entries contained in an a shipment of type ‘Billable‘ whose total price is less than $500.” In the JSON world you’d typically write some imperative code to loop through the data. XPath allows you describe things like this without having to get into the nitty gritty of how the traversal is actually performed, similar to how CSS selectors work with the browser DOM.

I do look forward to the JSON community (re?)developing schema and transformation languages to go along with this.