Commit Graph

105 Commits

Author SHA1 Message Date
Erick Tryzelaar f0c87fbd4c Format flats with Debug to properly print "-0.0". 2015-05-01 07:43:48 -07:00
Erick Tryzelaar e5df4b6653 Simplify PrettyFormatter::new 2015-04-26 12:05:38 -07:00
Erick Tryzelaar 12cf2f0b0b Simplify the return types 2015-04-26 11:01:55 -07:00
Erick Tryzelaar 8d4de2b3db Rename Serializer::new_with_formatter to with_formatter 2015-04-26 10:29:28 -07:00
Erick Tryzelaar e509adcac5 Allow the pretty printer character to be changed
This unfortunately loses the simd-ish whitespace printer, but since
pretty printing shouldn't be on a hot path, this shouldn't really
matter.

Partially addresses #65.
2015-04-26 09:29:06 -07:00
Erick Tryzelaar eb9c860cb4 Rename iterator.rs to iter.rs and expose it. 2015-04-26 09:23:08 -07:00
Daniel Landau 5b1225cc87 Fix compilation for latest nightly 2015-04-24 22:35:56 +03:00
Oliver Schneider c37f67b0a1 separate out the line/column counting from character iteration 2015-04-16 16:31:56 +02:00
Erick Tryzelaar 67e8ca354c Remove core feature 2015-04-12 11:36:09 -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 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 b30965ede4 Get serde to build, but tests are still failing 2015-04-02 13:27:57 -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 54a970e694 Remove an unnecessary import 2015-04-01 22:13:34 -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 1b1c605102 Pull deserialization impls into their own file 2015-03-26 07:58:26 -07:00
Erick Tryzelaar c369010d3d Allow json::de to work with io::Read 2015-03-24 08:55:20 -07:00
Erick Tryzelaar 5378d22708 Switch to the new custom_deserialize syntax 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 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