-
Notifications
You must be signed in to change notification settings - Fork 0
Lua API Data
Leonard Ramminger edited this page Aug 10, 2026
·
1 revision
Parse, emit, merge, and validate structured data in build.lua.
type option |
File extensions |
|---|---|
json |
.json |
yaml / yml
|
.yaml, .yml
|
xml |
.xml |
csv |
.csv |
toml |
.toml |
| Function | Input | Output |
|---|---|---|
deserialize_string(content, [options]) |
string | Lua table |
serialize_string(data, [options]) |
Lua table | string |
deserialize_file(path, [options]) |
path | Lua table |
serialize_file(path, data, [options]) |
path + table | writes file |
options is { type = "json" } etc. File helpers infer format from the extension when options is omitted.
| Function | Description |
|---|---|
merge(target, source) |
Deep-merge source into target
|
clone(table) |
Deep copy |
get(table, path, [default]) |
Dot path lookup ("a.b.c") |
set(table, path, value) |
Dot path assignment |
diff(left, right) |
Field-level { from, to } changes |
Input: Lua table + schema (table or JSON string).
Output: true on success; throws on failure.
| Keyword | Use |
|---|---|
type |
null, boolean, string, integer, number, array, object
|
enum |
Allowed values (array) |
required |
Required property names on objects |
properties |
Per-field nested schemas |
additionalProperties |
false to forbid extra keys |
items |
Schema for each array element |
beez.data.validate(
{ name = "beez", tags = { "ci", "lua" } },
{
type = "object",
required = { "name" },
properties = {
name = { type = "string" },
tags = {
type = "array",
items = { type = "string" },
},
},
additionalProperties = false,
}
)-- JSON round-trip
local cfg = beez.data.deserialize_file("config.json")
cfg.build.jobs = beez.sys.cpu_threads()
beez.data.serialize_file("config.generated.json", cfg)
-- TOML
local doc = beez.data.deserialize_string([[
title = "demo"
[owner]
name = "Ada"
]], { type = "toml" })Quick Reference · Glossary · FAQ
- Fundamentals
- Core Concepts
- Project Layout
- First Pipeline
- Phases and Scopes
- How Phases and Scopes Work
- Selecting with Phases and Scopes
- Designing Phases and Scopes
- Parallel Execution and Dependencies
- Configuration
- Configuration Overview
- Global User Config
- Project Config
- Environment Variables
- Performance Settings
- Cache Settings
- Config Reference
- CLI
- CLI Overview
- Running Targets
- Filtering by Phase
- Running a Single Step
- Listing Entities
- Output and Logging Flags
- Cache and Maintenance Flags
- Meta and Utility Commands
-
Project Scaffolding —
beez --init(embedded Tempify) - CLI Flag Reference
- Lua DSL
- DSL Overview
- Plugin System — Plugins, Config DSL, Standard-Workflows
- Step Declaration
- Task Declaration
- Workflow Declaration
- Order Declaration
- Configure Step
- ReqPack Declaration
- Beez API
- Step Context
- DSL Patterns
- Caching
- Caching Overview
- Step Cache
- Success Cache
- Glob Metadata Cache
- Artifact Patterns
- Cache Keys and Invalidation
- Cache Storage and Maintenance
- Caching Troubleshooting
- UI and Output
- Output Modes
- Progress and Animation
- Colors and Themes
- Run Summaries
- Logging and Log Files
- Development and Contribution
- Building and Setup
- Repository Layout
- Testing
- Code Quality
- Feature Development Workflow
- Submitting Changes