Commit Graph

4 Commits

Author SHA1 Message Date
Hugo Duncan
ec3af2cb6a Factor out attr module
Factors out field attribute code into the attr module.
2015-05-08 12:43:12 -04:00
Hugo Duncan
a935ebe8b9 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
2015-05-08 12:43:11 -04:00
Hugo Duncan
fd6462f8d1 Add serialize, deserialize specific rename
Adds the rename_serialize and rename_deserialize field attributes to
specify serialisation and deserialisation specific renames.
2015-04-21 17:58:18 -04:00
Erick Tryzelaar
2cd49060fa Rename #[serde(alias)] to #[serde(rename)] and add tests
Closes #9 and #47.
2015-04-01 22:14:28 -07:00