Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple serialization and JSON log format more clearly #202

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

hillu
Copy link
Collaborator

@hillu hillu commented Feb 26, 2024

Add a custom serde_json Formatter with support for byte arrays. SpecialFormatter adds a write_byte_array method that outputs URI-encoded strings.

Move percent encoding from QuotedString type to URIEscapeWriter which works as a filter for any type that implements the std::io::Write trait.

Where possible, use serialize_bytes(), either directly or via a Bytes helper type.

Add a custom serde_json Formatter with support for byte arrays.
SpecialFormatter adds a write_byte_array method that outputs
URI-encoded strings.

Move percent encoding from QuotedString type to URIEscapeWriter which
works as a filter for any type that implements the std::io::Write
trait.

Where possible, use serialize_bytes(), either directly or via a Bytes
helper type.
@hillu hillu merged commit 42f371b into threathunters-io:master Feb 26, 2024
5 checks passed
@hillu hillu deleted the custom-json-formatter branch February 26, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant