Expand description
JSON construction, serialization, and manipulation nodes.
JSON is a first-class Value type in the GK. Nodes can produce
and consume Value::Json(std::sync::Arc::new(serde_json::Value)) directly, avoiding
serialization/deserialization round-trips when passing structured
data between nodes or to adapters that consume JSON natively.
Objects are built compositionally: json_with(key, value)
produces a single-pair partial Json, and the variadic
json_object(parts...) merges them. Workload syntax:
record := json_object(
json_with("name", name_wire),
json_with("age", age_wire),
)Structs§
- ArrayAt
- Return the element at a given index from a bracket-encoded array.
- Array
Len - Return the number of elements in a bracket-encoded array string.
- Body
Column I32 body_column_i32(body, "name")— extract the named column from every row of a JSON result body, parse each as i32, and return the values as aVecI32wire.- Escape
Json - Escape a string for safe embedding in a JSON string value.
- Json
Array - Build a JSON array from N inputs.
- Json
Field - Extract a field from a JSON object by key.
- Json
Merge - Merge two JSON objects into one (shallow merge, right wins).
- Json
Object - Merge N partial Json Objects into a single Json Object.
- Json
Text - Flatten a JSON tree into a single newline-separated text by concatenating every leaf value’s textual form.
- Json
ToStr - Serialize a JSON value to a compact string.
- Json
ToStr Pretty - Serialize a JSON value to a pretty-printed string.
- Json
With - Build a single-pair partial JSON object:
{ key: value }. - Normalize
Vector - L2-normalize a bracket-encoded float vector string
[1.0,2.0,3.0]. - Random
Vector - Generate a deterministic f64 vector as a bracket-encoded JSON array string.
- StrTo
Json - Parse a JSON string into a JSON value.
- ToJson
- Wrap a single value as a JSON value.