Expand description
Readable, indented Links Notation representation.
This module implements the default output of crate::encode: a plain-text,
indented projection where keys and values are written as they are, so the file
can be read, grepped and reviewed without decoding anything.
§Shape
One construct — ( ) — is used for both objects and arrays, at every level
including the root. What distinguishes them is the content of the lines:
key value pairs make an object, bare values make an array.
(
type "RouterState"
server (
host "127.0.0.1"
port 18878
)
models (
"claude-haiku"
"claude-opus"
)
)§Value mapping
LinoValue | Readable form |
|---|---|
Object | ( ) with one key value pair per line |
Array | ( ) with one value per line |
String | quoted, never encoded |
Int / Float / Bool / Null | bare, so the type survives the round trip |
Empty containers keep their type: an empty array is () on one line, while an
empty object is written as ( and ) on two lines.
Only values that cannot be written as plain text are encoded: strings holding
control characters (including newlines and tabs, which line-based tooling and
CRLF normalisation would corrupt) are marked individually as
(base64 "…") instead of encoding the whole document.
Constants§
- BASE64_
MARKER - Marker used for values that cannot be represented as plain text.
- DEFAULT_
INDENT - Default indentation used by
encode.