2.4 KiB
1.0.0-beta.7 Serialization And Data Interchange Target
Status: released as 1.0.0-beta.7 on 2026-05-22.
1.0.0-beta.7 targets a deliberately narrow serialization/data-interchange
foundation after the beta.6 networking slice. The goal is compact JSON text
construction for CLI, file, and loopback-network programs without pretending
that Slovo already has the collections and string APIs needed for a complete
JSON library.
Slovo Source Surface
The staged source facade is lib/std/json.slo, importable explicitly as
std.json.
Exported helpers:
quote_string : (string) -> stringnull_value : () -> stringbool_value : (bool) -> stringi32_value : (i32) -> stringu32_value : (u32) -> stringi64_value : (i64) -> stringu64_value : (u64) -> stringf64_value : (f64) -> stringfield_string,field_bool,field_i32,field_u32,field_i64,field_u64,field_f64, andfield_nullarray0,array1,array2,array3object0,object1,object2,object3
The array and object helpers accept already-encoded JSON text fragments. They are compact construction helpers, not recursive data structures.
Runtime Call
The facade wraps one compiler-known runtime call:
std.json.quote_string(value string) -> string
The hosted runtime symbol is __glagol_json_quote_string. It returns a
complete compact JSON string literal including surrounding quotes. It escapes
quote, backslash, newline, tab, carriage return, backspace, form feed, and
other control bytes. Allocation failure uses the existing string allocation
trap.
Fixtures And Benchmarks
examples/projects/std-import-json/exercises explicitstd.jsonsource import.examples/projects/std-layout-local-json/mirrors the facade as a local module fixture and keeps the source-search contract explicit.benchmarks/json-quote-loop/adds a local-machine timing scaffold for JSON string quoting across Slovo, C, Rust, Python, Clojure, and Common Lisp/SBCL.
Deferrals
This scope does not add JSON parsing, recursive JSON values, maps/sets, generic collections, source-level byte/character scanners, slicing, streaming encoders, schema validation, Unicode normalization, embedded NUL support in the current null-terminated runtime string ABI, stable runtime helper symbols, stable ABI/layout/ownership guarantees, or a stable standard-library API freeze.