From a8986f0372ff58a4584dd5379db39be0cbfcea4b Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Sun, 28 Feb 2021 23:33:03 -0300 Subject: Update README --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 317fa3c..9567cbc 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,34 @@ Datafu ====== -A Rust library for extracting data from config objects and other arbitrary -object graphs, using a custom query language. +Datafu is a Rust library for extracting data from config objects and other +arbitrary object graphs, using a custom query language. As a query language, +it takes on aspects of both XPath and jq, but differs significantly in scope. +As a library, it attempts to keep things relatively straightforward. + +Comparison with XPath +--------------------- + +XPath is more-or-less standard. While it is primarily designed for XML, there +are implementations of XPath that can work with JSON and other formats. It's +also more or less type-aware and can do operations like numeric range checks +without the use of user callbacks. + +Unlike XPath, Datafu is not primarily designed for XML, but rather as a more +general-purpose tool that can also be used for XML. It even supports cyclic +graphs, such as those which can be found in Lua tables. + +Comparison with jq +------------------ + +jq is first and foremost a CLI tool. It's also Turing-complete. If an +[undecidable schema][halting_problem] isn't your thing, and the previous +section of this README didn't convince you to use XPath, then Datafu should be +your tool of choice. + +[halting_problem]: + https://en.wikipedia.org/wiki/Halting_problem + "Halting problem (Wikipedia)" License ------- -- cgit 1.4.1