pub fn decode_protocol_event(
text: &str,
) -> Result<DecodedEvent, EventDecodeError>Expand description
Parse one protocol v1 line, base-validate it, and return a typed decoded event.
text is a single JSON text value (one protocol line), not a JSONL stream.
The decode rules every SDK shares come from serde_json here: a repeated
key keeps its last value, a lone surrogate \u escape is invalid, and
arrays and objects nest at most 127 deep counting the envelope (serde_json’s
recursion limit). The other SDKs enforce the same rules explicitly, and
spec/fixtures/protocol_decode.json pins each one on both sides.