pub enum JsonProjectionMode {
TaggedCanonical,
UntaggedInterop,
TextLossy,
}Expand description
Selects which Expr <-> JSON projection to apply.
Variants§
TaggedCanonical
The canonical, lossless projection: $expr-tagged forms that round-trip
every Expr exactly. Delegates to crate::expr_to_json /
crate::json_to_expr.
UntaggedInterop
A lossy interop projection that emits/accepts plain, untagged JSON.
This is intended for foreign surfaces (for example LLM tool schemas and
tool-call arguments) that expect ordinary JSON without kernel tags. It is
NOT the canonical codec: structure such as symbols vs strings, number
domains, vectors vs lists, and most non-collection forms is collapsed and
cannot be recovered. Use JsonProjectionMode::TaggedCanonical whenever
faithful round-tripping is required.
TextLossy
A one-way, lossy text projection: Expr -> JSON produces a JSON string
containing the debug rendering of the expression. There is no faithful
inverse; JSON -> Expr reuses the JsonProjectionMode::UntaggedInterop
decoder.
Trait Implementations§
Source§impl Clone for JsonProjectionMode
impl Clone for JsonProjectionMode
Source§fn clone(&self) -> JsonProjectionMode
fn clone(&self) -> JsonProjectionMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for JsonProjectionMode
Source§impl Debug for JsonProjectionMode
impl Debug for JsonProjectionMode
impl Eq for JsonProjectionMode
Source§impl PartialEq for JsonProjectionMode
impl PartialEq for JsonProjectionMode
Source§fn eq(&self, other: &JsonProjectionMode) -> bool
fn eq(&self, other: &JsonProjectionMode) -> bool
self and other values to be equal, and is used by ==.