datafu

Crates.iodatafu
lib.rsdatafu
version0.1.0-alpha.2
sourcesrc
created_at2021-01-16 13:18:57.940066
updated_at2023-04-09 01:31:00.493953
descriptionA Rust library for extracting data from config objects and other arbitrary object graphs.
homepagehttps://soniex2.github.io/ganarchy/project/c0b4a8a326a320ac33c5d9d6bac2f7ea7eb703ce/
repositoryhttps://soniex2.autistic.space/git-repos/dfu.git
max_upload_size
id342790
size205,565
Soni L. (SoniEx2)

documentation

README

Datafu

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 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.

Comparison with Serde

As of Datafu 0.1.0, Datafu is powered by Serde. This enables relying on Serde for deserialization and Datafu for efficiency. Note, however, that Datafu is stateful.

Commit count: 0

cargo fmt