oa_gateway_stomp

Function sniff_type_hint

Source
pub fn sniff_type_hint(payload: &[u8]) -> Option<String>
Expand description

Best-effort type hint from a JSON or XML body.

JSON must be a single-key object; the key is the hint. XML uses the root local name (prefix stripped). Multi-key JSON, non-UTF-8, and other shapes return None.