Kuddle (Kuddle v0.2.1) View Source

Kuddle is a KDL (https://github.com/kdl-org/kdl) encoder and decoder.

Kuddle is KDL 1.0.0 compliant and should be able to process most if not all KDL documents without issue.

And yes UTF-8 works.

Link to this section Summary

Functions

Decode a KDL document into kuddle nodes

Encode a kuddle document as serialized KDL

Select allows searching a document for particular nodes by name, and or attributes.

Link to this section Types

Link to this section Functions

Specs

decode(String.t()) :: {:ok, document(), rest :: String.t()} | {:error, term()}

Decode a KDL document into kuddle nodes

Usage:

[%Node{name: "node"}] = Kuddle.decode("node")

Specs

encode(document()) :: {:ok, String.t()} | {:error, term()}

Encode a kuddle document as serialized KDL

Usage:

"node" = Kuddle.encode([%Node{name: "node"}])

Specs

select(document(), Kuddle.Path.path()) :: document()

Select allows searching a document for particular nodes by name, and or attributes.

Usage:

[%Node{name: "node"}] = Kuddle.select(document, ["node"])