Erick Tryzelaar
54a970e694
Remove an unnecessary import
2015-04-01 22:13:34 -07:00
Erick Tryzelaar
dcf7037792
Add some basic docs
2015-03-31 22:33:18 -07:00
Erick Tryzelaar
99b9524201
Change the name of ValueDeserializer::{,into_}deserializer
2015-03-31 20:45:59 -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
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
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
8821421357
Docs, json::Value::U64, and bring many of the rust-serialize fns to Value
2015-03-18 20:51:48 -07:00
Erick Tryzelaar
eb4af09456
Simplify the variant deserializer visitor
2015-03-18 07:35:05 -07:00
Erick Tryzelaar
78137ee3a4
Rewrite enum deserialization to not require allocations
2015-03-16 22:42:04 -07:00
Erick Tryzelaar
b40d8f7bac
Remove the first argument from visit_{seq,map}_elt
2015-03-16 22:30:02 -07:00
Oliver Schneider
f21cbb71e2
MapVisitor::end and SeqVisitor::end were mostly never called
2015-03-16 13:27:00 +01:00
Erick Tryzelaar
87ff636c10
Fix some warnings
2015-03-14 12:03:53 -07:00
Erick Tryzelaar
aedd5f57cf
Split json compact and pretty serializer. Recover 20MB/s
2015-03-12 21:15:47 -07:00
Erick Tryzelaar
dc87288f48
Allow json missing fields to be treated as a null
...
Closes #34 .
2015-03-12 20:44:16 -07:00
Erick Tryzelaar
5dd53e7ea3
Change ser::{Seq,Map}Visitor to return an optional exact length
...
This is necessary for formats that serialize the length in the
format stream. Those formats need the exact length, so the
iterator-style size_hint has the wrong semantics.
2015-03-12 19:40:46 -07:00
Erick Tryzelaar
9e454a243a
Rename Serialize::visit to Serialize::serialize
2015-03-12 07:33:34 -07:00
Erick Tryzelaar
3f62b6d2bf
Merge ser::Serializer and ser::Visitor
2015-03-11 11:05:46 -07:00
Erick Tryzelaar
fbd6d1974a
Remove the unused Serializer::Value associated type
2015-03-11 10:15:27 -07:00
Erick Tryzelaar
805a3435cf
Replace serde1 with serde2!
...
Closes #26 !
2015-03-08 22:56:33 -07:00
Erick Tryzelaar
65cfcd03f8
Port serde2 to std::io, which cuts the speed by 26% :(
2015-02-16 18:17:50 -08:00
Erick Tryzelaar
1f98ee0d8f
Use writer.write_all(b"...") instead of write! for static strings
2015-02-14 10:19:15 -08:00
Erick Tryzelaar
004a89510e
ported over to the new std::io, but it's half the speed of std::old_io
2015-02-14 10:01:22 -08:00
Erick Tryzelaar
4dccf8cdec
Clean up warnings in serde
2015-02-13 10:26:13 -08:00
Thomas Bahn
70e8556e07
Follow rustc: New destructor semantics
2015-02-06 22:27:19 +01:00
Thomas Bahn
03820f3d78
Switch to rustc_serialize for tests
2015-02-06 22:27:19 +01:00
Thomas Bahn
1cf41295c7
Add feature gate io
2015-02-06 22:23:16 +01:00
Thomas Bahn
a87fab9ecc
Simplify some code using auto-deref
2015-02-06 22:23:16 +01:00
Thomas Bahn
81f84a4ea4
Remove unneeded mut specifiers
2015-02-06 22:23:16 +01:00
Thomas Bahn
79ff9fdafa
Use the IntoIterator trait in for loops
2015-02-06 22:23:16 +01:00
Thomas Bahn
cb8492d74b
Follow rust std: Error requires an implementation of fmt::Display
2015-02-06 22:23:16 +01:00
Thomas Bahn
5782657502
Follow rust std: The old io module is now called old_io
2015-02-06 22:23:16 +01:00
Thomas Bahn
9a284ae7c2
Follow rust std: fmt::Show was renamed to fmt::Debug
2015-02-06 22:23:16 +01:00
Thomas Bahn
5dd077969c
Use slicing syntax instead of .as_slice()
2015-02-06 22:23:16 +01:00
Thomas Bahn
3022d7301a
Use deref coercions when possible
2015-02-06 22:23:15 +01:00
Thomas Bahn
361acd37d0
Follow rust std: int, uint were renamed to isize, usize
2015-02-06 22:23:15 +01:00
Dan Burkert
460dbce8cc
Update for rustc 1.0.0-nightly (8903c21d6 2015-01-15 22:42:58 +0000)
2015-01-17 16:36:15 -08:00
Erick Tryzelaar
8715a41158
Update to rust HEAD
2015-01-07 09:30:11 -08:00
Erick Tryzelaar
b98719a4a0
update to rust HEAD, switch to rustc_serialize
2015-01-04 17:18:50 -08:00
Thomas Bahn
814c0570b8
Fix: String::from_utf8 became stable and changed signature
2015-01-01 14:22:23 +01:00