
Lucas Ferrari
My first point is that a JSON path is not a thing you can guess, because the syntax changed more than once and tools disagree about which version they implement. The current form separates the object keys, with a dot between them, from the array indices, with a bracket. That split is not cosmetic: a key containing a dot is indistinguishable from a nesting separator unless it is quoted, and a key containing a bracket breaks a path outright. Keys with punctuation in them are common in data nobody designed, which is where a large share of these failures come from. Matching one of several values and matching by pattern are supported at different levels by different tools, and a query that works in one library is not portable. On large documents, the query method matters more than the query. Reading the whole file into memory works on a small file and fails on one you cannot fit, so a streaming parser and a path evaluated per record is the architecture that holds. Comparing two structures is a separate problem from querying one. Order matters in an array and ignoring it requires saying so, because two documents differing only in key order are equal in one sense and a change in the other. I also cover the JSON features a query tool may not implement, since a document containing them parses and then fails at the point of use. Every example here includes the document it runs against, because a path that looks wrong against one structure can be right against another and the failure is not self-evident.
About ToolSura
ToolSura offers 80+ free, privacy-first online tools that run 100% in your browser — no uploads, no logins. Learn more about our mission →