# `Tinkex.Streaming.ServerSentEvent`
[🔗](https://github.com/North-Shore-AI/tinkex/blob/v0.4.0/lib/tinkex/streaming/sse_decoder.ex#L1)

Representation of a server-sent event.

# `t`

```elixir
@type t() :: %Tinkex.Streaming.ServerSentEvent{
  data: String.t(),
  event: String.t() | nil,
  id: String.t() | nil,
  retry: non_neg_integer() | nil
}
```

# `json`

```elixir
@spec json(t()) :: term()
```

Decode the event data as JSON if possible; otherwise return the raw string.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
