Skip to main content

Crate synx_format

Crate synx_format 

Source

Modules§

binary
SYNX Binary Format (.synxb) — compact binary serialization with string interning.
diff
Structural diff between two SYNX values.
schema_json
Build JSON Schema from !active Constraints and validate Value instances (optional jsonschema feature).

Structs§

Constraints
Constraints from [min:3, max:30, required, type:int].
DiffChange
A single changed key with its previous and new value.
DiffResult
Result of a structural diff between two SYNX objects.
IncludeDirective
Include directive: !include path [alias]
Meta
Metadata for a single key (markers, args, constraints).
Options
Options for active mode resolution.
ParseResult
Full parse result with metadata.
Synx
Main entry point for the SYNX parser.
UseDirective
Use directive: !use @scope/name [as alias]

Enums§

Mode
File mode.
Value
SYNX value types.

Functions§

diff_objects
Compute a structural diff between two SYNX objects (top-level keys).
diff_to_value
Convert a DiffResult into a Value::Object suitable for JSON serialisation.
metadata_to_json_schema
Build a draft 2020-12 JSON Schema object from ParseResult::metadata.
parse
Parse a SYNX text string into a value tree with metadata.
reshape_tool_output
Reshape parsed tree for !tool mode.
resolve
Resolve all active-mode markers in a ParseResult. Returns the resolved root Value.
safe_calc
Safely evaluate an arithmetic expression. All variable references must be substituted with numbers before calling this.
to_json
Convert a Value to a JSON string.
value_to_json_value
Convert a parsed SYNX Value tree to serde_json::Value for JSON Schema tooling.
write_json
Write a Value as JSON string (for FFI output).

Type Aliases§

MetaMap
Map of key → metadata for one object level.