{"id":16949670,"url":"https://github.com/tailhook/serde-str","last_synced_at":"2025-10-10T15:50:28.757Z","repository":{"id":57666761,"uuid":"113569932","full_name":"tailhook/serde-str","owner":"tailhook","description":"A serde wrapper, that can be used to serialize data types using Display and FromStr","archived":false,"fork":false,"pushed_at":"2022-04-06T12:18:24.000Z","size":20,"stargazers_count":10,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-19T03:44:36.687Z","etag":null,"topics":["rust","serde","string"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailhook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-08T12:01:13.000Z","updated_at":"2025-02-06T04:52:20.000Z","dependencies_parsed_at":"2022-09-02T15:01:02.635Z","dependency_job_id":null,"html_url":"https://github.com/tailhook/serde-str","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tailhook/serde-str","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-str","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-str/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-str/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-str/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailhook","download_url":"https://codeload.github.com/tailhook/serde-str/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Fserde-str/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004568,"owners_count":26083736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","serde","string"],"created_at":"2024-10-13T21:55:46.072Z","updated_at":"2025-10-10T15:50:28.727Z","avatar_url":"https://github.com/tailhook.png","language":"Rust","readme":"﻿Serde Str\n=========\n\n[Documentation][docs.rs] |\n[Github][git] |\n[crates.io][crates.io] |\n[libs.rs][lib.rs]\n\n[docs.rs]: https://docs.rs/serde_str\n[git]: https://github.com/tailhook/serde-str\n[crates.io]: https://crates.io/crates/serde_str\n[lib.rs]: https://lib.rs/serde_str\n[`Display`]: https://doc.rust-lang.org/std/fmt/trait.Display.html\n[`ToString`]: https://doc.rust-lang.org/std/string/trait.ToString.html\n[`FromStr`]: https://doc.rust-lang.org/std/str/trait.FromStr.html\n[serde]: https://serde.rs/\n\nA [serde][] wrapper that simplifies (de)serializaton of data types using [`Display`][]\n(as [`ToString::to_string(\u0026self)`][`ToString`]) and [`FromStr`][] as intermediataries.\n\nExamples\n-------\n\n```rust\nuse serde::{Serialize, Deserialize};\nuse std::net::IpAddr;\n\n#[derive(Serialize, Deserialize)]\nstruct Struct {\n\t/// By default IpAddr serializes the same in human-readable formats\n\t/// like json. This forces the impl even for binary formats.\n\t///\n\t/// More imporantly this is useful for types which don't have serde impl.\n\t#[serde(with = \"serde_str\")]\n\tip: IpAddr,\n}\n#[derive(Serialize, Deserialize)]\nstruct Optional {\n\t/// The above but handling null types\n\t#[serde(with = \"serde_str::opt\")]\n\tip: Option\u003cIpAddr\u003e,\n}\n#[derive(Serialize, Deserialize)]\nstruct Empty {\n\t/// The above but an empty string is a none-value\n\t#[serde(with = \"serde_str::emp\")]\n\tip: Option\u003cIpAddr\u003e,\n}\n#[derive(Serialize, Deserialize)]\nstruct EmptyOptional {\n\t/// The above but an empty string, null, or unspecified is a none-value.\n\t#[serde(with = \"serde_str::emp\", default)]\n\tip: Option\u003cIpAddr\u003e,\n}\n```\n\nSee [docs.rs][] for more examples and usage.\n\nLicense\n=======\n\nLicensed under either of\n\n* Apache License, Version 2.0,\n  (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)\n* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT)\n  at your option.\n\nContribution\n------------\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fserde-str","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailhook%2Fserde-str","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Fserde-str/lists"}