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

Encoding/Decoding bytestrings with libserialize #15683

Closed
aochagavia opened this issue Jul 15, 2014 · 2 comments
Closed

Encoding/Decoding bytestrings with libserialize #15683

aochagavia opened this issue Jul 15, 2014 · 2 comments

Comments

@aochagavia
Copy link
Contributor

Some encoding protocols don't enforce UTF8 in strings. In this cases, it would be useful to provide functions to encode/decode a string as an array of bytes (maybe something like read_bytestring and emit_bytestring).

An example of this situation is the bencode protocol. Currently, the only way to decode a struct containig a byte string is to implement a special trait called FromBencode.

Another use case for this is to (de)serialize XML (see this subreddit thread)

Should I submit a PR to add this?

@mneumann
Copy link
Contributor

related to #12293, and needed for msgpack as well.

@steveklabnik
Copy link
Member

Serialize has now been moved out of tree.

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

No branches or pull requests

3 participants