Adds serializer format specific field names

Allows different field names to be used for different external formats.

Field names are specified using the `rename` field attribute, e.g:

    #[serde(rename(xml= "a4", json="a5"))]

Reverts #62

Addresses #61
This commit is contained in:
Hugo Duncan
2015-04-27 18:05:54 -04:00
parent af752ddcb5
commit a935ebe8b9
10 changed files with 256 additions and 58 deletions
+4
View File
@@ -179,6 +179,10 @@ pub trait Serializer {
fn visit_map_elt<K, V>(&mut self, key: K, value: V) -> Result<(), Self::Error>
where K: Serialize,
V: Serialize;
fn fmt() -> &'static str {
""
}
}
pub trait SeqVisitor {