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

Add ser_as_str feature to serialize using serialize_str() #52

Merged
merged 2 commits into from
Oct 22, 2023

Conversation

elrafoon
Copy link
Contributor

I'm doing a lot of no_std firmware development, and frequently use serde_json_core crate.

This serializer does not support collect_str() used in ipnet's serialization code since 1096c55.

This patch adds new feature to enable serialization by formatting Ipv*Net addr to heapless::String and then serializing using serialize_str(). Since maximum formatted address length is fixed, and not too big, memory usage is still very low.

elrafoon and others added 2 commits October 11, 2023 18:09
Serializer may not support collect_str, as is the case with
serde_json_core crate.
@krisprice krisprice merged commit 585bcad into krisprice:master Oct 22, 2023
@krisprice
Copy link
Owner

Merged and published on crates.io, thanks @elrafoon

@elrafoon
Copy link
Contributor Author

Thanks!

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.

2 participants