Serializers¶
Format events before sending to a destination.
Overview¶
Serializers convert Keycloak events into your desired output format.
Available Formats¶
| Serializer | Config | Content-Type | Binary? |
|---|---|---|---|
| JSON | json (default) |
application/json |
No |
| YAML | yaml |
application/yaml |
No |
| XML | xml |
application/xml |
No |
| CSV | csv |
text/csv |
No |
| TOML | toml |
application/toml |
No |
| Properties | properties |
text/plain |
No |
| CBOR | cbor |
application/cbor |
Yes |
| Smile | smile |
application/x-jackson-smile |
Yes |
The Content-Type is sent as the contenttype header (or native content-type property where supported). This allows consumers to know how to deserialize the message body.
Quick Examples¶
YAML for human-readable logs:
CBOR for IoT/low bandwidth:
CSV for data exports:
Configuration¶
Serializers are optional. To explicitly set one:
Most routes don't need this — JSON is used automatically.