Commit Graph

61 Commits

Author SHA1 Message Date
Erick Tryzelaar 00b502a6d2 Add a json pretty printer 2015-03-05 22:16:11 -08:00
Erick Tryzelaar 58761d3d19 Convert over to where clauses 2015-03-05 20:07:40 -08:00
Erick Tryzelaar 2ee5a416ad Factor out the remaining json tests into tests/ 2015-03-05 19:49:17 -08:00
Erick Tryzelaar ddfaf9d177 Add Deserializer::visit_enum to help json enum deserialization 2015-03-05 19:17:18 -08:00
Erick Tryzelaar 1b632cea9c Remove unnecessary inlines 2015-03-05 07:35:55 -08:00
Erick Tryzelaar e7ce710da5 Fix parsing json into optional types
Does not yet handle parsing missing values as `None` yet though.
Closes #25.
2015-03-04 09:45:11 -08:00
Erick Tryzelaar e9f356755f Add json value deserializer 2015-03-04 09:45:11 -08:00
Erick Tryzelaar cd3cad8ef5 Fix serializing json enums 2015-03-04 09:45:11 -08:00
Erick Tryzelaar 4b2354597d Start fixing the json tests 2015-03-04 09:44:56 -08:00
Erick Tryzelaar b2f52df5ff Fix serializing json objects 2015-03-03 21:55:48 -08:00
Erick Tryzelaar ecc19bdbdb Convert over to where clauses 2015-03-03 19:34:16 -08:00
Erick Tryzelaar 1182ad0223 Fix tests, make Deserializer::visit take a value not a reference 2015-03-03 11:09:09 -08:00
Erick Tryzelaar 9904d32ff9 Fix serde2_macros and benchmarks, and silence some warnings 2015-03-03 11:07:33 -08:00
Erick Tryzelaar 5f46adb2d0 Merge pull request #20 from inrustwetrust/json-parser-trailing-whitespace
Make the JSON parser accept trailing whitespace
2015-02-19 08:36:36 -08:00
Erick Tryzelaar 3fac47e01c Fix #[derive_serialize] for enums 2015-02-19 08:35:42 -08:00
inrustwetrust fb77b13174 Make the JSON parser accept trailing whitespace 2015-02-18 20:39:24 +01:00
Erick Tryzelaar 65cfcd03f8 Port serde2 to std::io, which cuts the speed by 26% :( 2015-02-16 18:17:50 -08:00
Thomas Bahn d43946b6a6 Fix the json object delimiters
Write "{" instead of "{{". Same for the counterpart.
2015-02-16 20:50:41 +01:00
Erick Tryzelaar 33633a5e14 Get everything to compile and fix some warnings 2015-02-11 11:24:53 -08:00
Erick Tryzelaar 3fd42e616c Initial macro support for deserializing structs and tuple structs 2015-02-10 21:08:04 -08:00
Erick Tryzelaar 044825829a Update to rust HEAD 2015-02-10 07:50:43 -08:00
Thomas Bahn f18c28161d Follow rust std: Peekable changed signature 2015-02-06 22:27:19 +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
Erick Tryzelaar f7eb082339 Initial port of build_log 2015-01-18 10:05:13 -08:00
Erick Tryzelaar cc40b0ec5e Update json::Value to work with associated types 2015-01-17 23:01:03 -08:00
Erick Tryzelaar 4fb427923b Support json deserialization 2015-01-17 22:37:17 -08:00
Erick Tryzelaar f8fb17b2ff Convert json::ser to associated types 2015-01-17 22:20:28 -08: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
Thomas Bahn 814c0570b8 Fix: String::from_utf8 became stable and changed signature 2015-01-01 14:22:23 +01:00
Thomas Bahn 85d0c8e4e8 Rename FP* to FpCategory::* following std changes 2014-12-30 14:52:27 +01:00
Thomas Bahn 879baec029 Fix: String::from_utf8 changed function signature
Following a rust std change.
2014-12-23 18:35:26 +01:00
Thomas Bahn a276ec4bba Fix: Utf16 handling moved from std into unicode crate
Following a rust change.
2014-12-23 18:35:00 +01:00
Thomas Bahn 17ffa65cb2 Replace StrAllocating with String type in function parameters
The key parameter of the insert functions are of type String now.
As insert requires ownership of its parameter `key` and StrAllocating
being gone in rust these functions now communicate that ownership
in their signature.

As a result &str must be converted into a String at the caller instead
of the callee.

The Trait ToOwned isn't an alternative as it's a generalized Clone.
StrAllocating simply has hidden an allocation or move.
2014-12-23 18:34:20 +01:00
Thomas Bahn 512a54e983 Replace TreeMap with BTreeMap in the serde2 2014-12-23 18:33:37 +01:00
Erick Tryzelaar c75f5caf8f Update serde2 to rust HEAD 2014-12-13 16:58:31 -08:00
Erick Tryzelaar 73a9dd86b9 wip: refactor 2014-12-08 23:13:17 -08:00
Erick Tryzelaar fcd276176b wip: remove error fns from de 2014-12-08 22:45:58 -08:00
Erick Tryzelaar 6caf7b8e0b flesh out serde2::json 2014-12-06 08:02:34 -08:00
Erick Tryzelaar f6434fcf77 add serde2 json deserializing to the benchmark 2014-12-05 22:19:30 -08:00
Erick Tryzelaar 8b9da64e29 Get serde2 compiling again 2014-12-05 16:24:32 -08:00
Erick Tryzelaar ff8c8c77cc Update to latest rust master 2014-11-17 19:21:46 -08:00
Erick Tryzelaar b62bb24751 Inline the visitor 2014-10-23 10:26:43 -07:00
Erick Tryzelaar 6c98a3b739 Thread a visitor through the serializers 2014-10-13 20:43:20 -07:00
Erick Tryzelaar 1c3a42ea56 Serialization should have an error type 2014-10-11 11:05:24 -07:00