프로젝트
GitHub에서 보기
RReverser/serde-xml-rs
소개
xml-rs 기반 Serde 역직렬화기(1.0 이상 호환).
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalserde-xml-rs
xml-rs based serializer and deserializer for Serde (compatible with 1.0)
Example usage
use serde::{Deserialize, Serialize};
use serde_xml_rs::{from_str, to_string};
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct Item {
name: String,
source: String,
}
fn main() {
let src = r#"<?xml version="1.0" encoding="UTF-8"?><Item><name>Banana</name><source>Store</source></Item>"#;
let should_be = Item {
name: "Banana".to_string(),
source: "Store".to_string(),
};
let item: Item = from_str(src).unwrap();
assert_eq!(item, should_be);
let reserialized_item = to_string(&item).unwrap();
assert_eq!(src, reserialized_item);
}
Breaking changes in version 0.8.0
Notably:
- The
$valuename has been changed to#content(could become configurable in the future). - Fields that are deserialized from attributes must now have a name that starts with a
@. This aligns with what was introduced in the serializer.
See MIGRATION.md for more details, and tips on how to migrate.
관련 프로젝트 살펴보기
불러오는 중…