Commit Graph

715 Commits

Author SHA1 Message Date
Erick Tryzelaar
cca72f2dbc Merge pull request #55 from sfackler/master
Add doc link to Cargo.toml and doc attr
2015-04-12 22:22:25 -07:00
Steven Fackler
5013b37c09 Add doc link to Cargo.toml and doc attr
The attribute allows cross-crate rustdoc links.
2015-04-12 22:21:00 -07:00
Erick Tryzelaar
c90dc9f48f bump version to 0.3.1 2015-04-12 11:43:35 -07:00
Erick Tryzelaar
67e8ca354c Remove core feature 2015-04-12 11:36:09 -07:00
Erick Tryzelaar
9a4ba047c4 Remove collections feature flag and disable VecMap, which is unstable 2015-04-12 10:48:32 -07:00
Erick Tryzelaar
7622255d6f Remove the std_misc feature flag 2015-04-12 10:43:29 -07:00
Erick Tryzelaar
8ba1e7aceb Remove the need for the unicode feature flag 2015-04-12 10:42:57 -07:00
Erick Tryzelaar
5f6838130d Update to Rust HEAD 2015-04-12 10:32:54 -07:00
Erick Tryzelaar
e0eff942b1 Add Error::unknown_field_error 2015-04-12 10:32:54 -07:00
Erick Tryzelaar
1da47c0870 Change de::VariantVisitor to let deserializers know the variant kind
This allows formats like cbor that encode a unit variant as just a
string to work.

[breaking-change]
2015-04-12 10:32:54 -07:00
Erick Tryzelaar
d36879f5ee Merge pull request #54 from apoelstra/no-impl-bytebuf
Remove `impl Into<Vec<u8>> for ByteBuf` since it causes a compile error
2015-04-12 10:32:36 -07:00
Andrew Poelstra
f363cb435a Remove impl Into<Vec<u8>> for ByteBuf since it causes a compile error
As BurntSushi observes, there is an `impl<T, U> Into<U> for T where U: From<T>`
in libcore. We have `From<Vec<u8>>` for `ByteBuf` since we have implemented
`From<T> for ByteBuf where T: Into<Vec<u8>>`, so this is redundant anyway.
2015-04-11 17:51:31 -05:00
Erick Tryzelaar
d8506e9a6d Update to rust HEAD 2015-04-05 13:20:33 -04:00
Erick Tryzelaar
87503d11e9 Merge pull request #49 from alexcrichton/tweak-some-impls
Tweak some Deserialize/Serialize impls
2015-04-03 12:04:50 -04:00
Erick Tryzelaar
d0b49d9b89 Finish updating to rust HEAD 2015-04-02 19:13:25 -07:00
Erick Tryzelaar
b30965ede4 Get serde to build, but tests are still failing 2015-04-02 13:27:57 -07:00
Alex Crichton
ace6d9e442 Generalize some serialization impls
* Impl Serialize for bare `str`
* Expand `&T` and `&mut T` blanket impls to include `T: ?Sized`
* Expand `Box<T>` blanket impl to include `T: ?Sized`
2015-04-02 12:54:21 -07:00
Alex Crichton
e150553d58 Add deserialize impls for smart pointers
This allows deserializing into a Box/Arc/Rc pointer
2015-04-02 12:53:51 -07:00
Erick Tryzelaar
ed569bd3f6 Update to latest rust nightly 2015-04-01 22:51:02 -07:00
Erick Tryzelaar
d00c1ad6d0 Remove the use of serde_macros from the doctests
This has been disabled in the upcoming beta.
2015-04-01 22:19:14 -07: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
Erick Tryzelaar
54a970e694 Remove an unnecessary import 2015-04-01 22:13:34 -07:00
Erick Tryzelaar
d57f02884f Work on the README, add a json example 2015-04-01 21:59:37 -07:00
Erick Tryzelaar
dcf7037792 Add some basic docs 2015-03-31 22:33:18 -07:00
Erick Tryzelaar
55eb390778 Update the readme 2015-03-31 22:16:15 -07:00
Erick Tryzelaar
99b9524201 Change the name of ValueDeserializer::{,into_}deserializer 2015-03-31 20:45:59 -07:00
Erick Tryzelaar
45bd239202 Release 0.3.0 2015-03-31 13:01:17 -07:00
Erick Tryzelaar
54009e0991 Factor out value deserializers 2015-03-31 12:56:17 -07:00
Erick Tryzelaar
bfe7a04c4d Update the location of json errors coming from "Deserialize" 2015-03-30 19:50:41 -07:00
Erick Tryzelaar
3167da72d8 Minor whitespace cleanup 2015-03-28 15:40:56 -07:00
Erick Tryzelaar
0d725a63b0 Add some serialization docs 2015-03-26 08:11:43 -07:00
Erick Tryzelaar
ee0cd4aba9 Pull the serialization impls into their own file 2015-03-26 08:05:29 -07:00
Erick Tryzelaar
1b1c605102 Pull deserialization impls into their own file 2015-03-26 07:58:26 -07:00
Erick Tryzelaar
44edfa5974 Add {,de}serializer for VecMap 2015-03-26 07:45:22 -07:00
Erick Tryzelaar
aa8d13456a Add bytes type to enable {,de}serializing to a byte array 2015-03-25 23:03:01 -07:00
Erick Tryzelaar
4beb86ab7e Update to rust HEAD 2015-03-25 10:43:25 -07:00
Erick Tryzelaar
c369010d3d Allow json::de to work with io::Read 2015-03-24 08:55:20 -07:00
Erick Tryzelaar
1618faed63 Add deserialization impls for {BTree,Hash}{Map,Set} 2015-03-23 19:02:20 -07:00
Erick Tryzelaar
9059b734aa Merge pull request #46 from oli-obk/no_rustc_serialize_propagation
require rustc-serialize only in tests and benchmarks
2015-03-23 17:59:55 -07:00
Erick Tryzelaar
89f463111e Merge pull request #42 from Byron/master
fix(macros): fully qualified usage of `Result`
2015-03-23 09:59:55 -07:00
Sebastian Thiel
2962287703 fix(macros): fully qualified usage of Result
Otherwise it was possible for the expanded macro to pickup a
user-defined `Result` type, which didn't fulfill the required type
bounds and cause compilation failure.
2015-03-23 17:04:23 +01:00
Oliver 'ker' Schneider
aa3c55fd98 require rustc-serialize only in tests and benchmarks 2015-03-22 14:16:58 +01:00
Erick Tryzelaar
17c295680e Remove an unused variable 2015-03-20 08:47:48 -07:00
Erick Tryzelaar
09de237033 Allow Vecs, BTreeMaps, and HashMaps to be deserialized from a unit
Closes #36
2015-03-20 08:47:33 -07:00
Erick Tryzelaar
d17846eff1 Add deserializer type hinting hooks
Formats like xml have trouble knowing if they should deserialize
tags into a sequence from the stream they are deserializing from.
This PR adds hooks so the deserializee can inform the deserializer
to provide them a sequence if possible.

Closes #38.
2015-03-20 08:32:33 -07:00
Erick Tryzelaar
5378d22708 Switch to the new custom_deserialize syntax 2015-03-19 20:19:49 -07:00
Erick Tryzelaar
c8b2ad01b5 Update to rust HEAD 2015-03-19 20:19:49 -07:00
Erick Tryzelaar
e778c7e25c Update to rust HEAD 2015-03-19 20:19:48 -07:00
Erick Tryzelaar
f0d0dd2982 Merge pull request #41 from hugoduncan/feature/mark-field-attributes-used
Mark serde field attributes as used
2015-03-19 20:08:50 -07:00
Hugo Duncan
3e63d34c00 Mark serde field attributes as used
Prevents unused attribute warnings in code that marks fields with
field level #[serde] attributes.
2015-03-19 11:04:08 -04:00