pub fn text_to_json(type_oid: u32, text: &str) -> Result<Value, FaucetError>Expand description
Decode a text-encoded value with the given column type OID into JSON.
Unknown OIDs and decode failures both fall back to wrapping the raw text
in a JSON string — this is the safest default for a generic CDC
connector. We never panic on bad data; the only way this returns Err is
if a structurally promised invariant is violated (e.g. OID_BYTEA text
that doesn’t start with \x).