mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-30 23:38:02 +00:00
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:
@@ -463,6 +463,11 @@ impl<Iter> de::Deserializer for Deserializer<Iter>
|
||||
Err(self.error(ErrorCode::ExpectedSomeValue))
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn fmt() -> &'static str {
|
||||
"json"
|
||||
}
|
||||
}
|
||||
|
||||
struct SeqVisitor<'a, Iter: 'a + Iterator<Item=io::Result<u8>>> {
|
||||
|
||||
Reference in New Issue
Block a user