Lossless JSON serialization for cp-ast-core AST documents.
Provides full-snapshot JSON roundtrip that preserves arena structure, tombstones, IDs, counters, and ordering through Rust → JS → Rust cycles.
Use [serialize_ast] and [deserialize_ast] for complete documents, or
[serialize_ast_compact] when byte size matters. Editor integrations can
serialize actions with [serialize_action] / [deserialize_action] and
serialize UI projections with [serialize_projection].
Example
use AstEngine;
use ;
let engine = new;
let json = serialize_ast.expect;
let restored = deserialize_ast.expect;
assert_eq!;
Schema Notes
IDs are encoded as decimal strings so JavaScript callers do not lose integer
precision. The top-level JSON document is versioned with
[dto::CURRENT_SCHEMA_VERSION].