pub fn tuple_to_json(tuple: &TupleData, relation: &RelationInfo) -> StringExpand description
Converts tuple data to a JSON string using column names from the relation.
Produces a flat JSON object like {"id": "42", "name": "Alice"}.
All values are serialized as strings (matching pgoutput text format).
Writes JSON directly to a String buffer instead of building an
intermediate HashMap, avoiding per-row map + key/value cloning.