One entry changed.
The comment, block order, and two-space indentation remain fixed around the edit.
Before: 8080
After: 9090
Surrounding lines: preserved
Parse, read, and edit CCL from Gleam. Your comments, key order, and indentation stay where you put them.
Gleam ≥ 1.11 · Erlang target · MIT
The comment, block order, and two-space indentation remain fixed around the edit.
Before: 8080
After: 9090
Surrounding lines: preserved
Four steps cover the full document loop. The API returns typed errors at every boundary, so the quickstart never hides failure behind placeholder helpers.
ccl targets the Erlang VM and uses gleam_stdlib as its only runtime dependency.
gleam add cclparse returns an opaque Document that retains the original text and the options used to read it.
let assert Ok(doc) = ccl.parse(source)Typed accessors return Result values and report missing keys or shape mismatches without crashing.
let assert Ok(8080) =\n ccl.get_int(doc, ["server", "port"])Edits rewrite the affected entry in place. Comments, key order, and surrounding indentation stay intact.
let assert Ok(updated) =\n ccl.set_int(doc, ["server", "port"], 9090)\n\nccl.to_string(updated)Learn the public ccl module by task. Hexdocs remains the complete function reference.