summary refs log tree commit diff
path: root/src/libextra/json.rs
AgeCommit message (Collapse)AuthorLines
2014-01-07extratest: Fix all leaked trait importsAlex Crichton-2/+1
2013-12-11Make 'self lifetime illegal.Erik Price-44/+44
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-04Rename extra::json::*::init() constructors to *::new()Kevin Ballard-48/+48
2013-11-29extra: missed a couple `@` in jsonErick Tryzelaar-9/+9
2013-11-29extra: json::Encoder should take a &mut io::WriterErick Tryzelaar-50/+50
2013-11-29extra: Rename json constructors into *::initErick Tryzelaar-69/+77
2013-11-29Remove some unnecessary impls from jsonErick Tryzelaar-8/+0
2013-11-29Remove @ from json::ErrorErick Tryzelaar-41/+41
2013-11-28Register new snapshotsAlex Crichton-5/+5
2013-11-26librustc: Fix merge fallout.Patrick Walton-2/+2
2013-11-26test: Remove all remaining non-procedure uses of `do`.Patrick Walton-16/+16
2013-11-26librustuv: Remove all non-`proc` uses of `do` from `libextra` andPatrick Walton-3/+1
`librustuv`.
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-5/+5
2013-11-24extra: improve the errors for the JSON Decoder.Huon Wilson-25/+126
Fixes #4244.
2013-11-19libextra: Convert uses of `&fn(A)->B` to `|A|->B`.Patrick Walton-61/+54
2013-11-11Move std::rt::io to std::ioAlex Crichton-6/+6
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-2/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-24Remove even more of std::ioAlex Crichton-96/+96
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-23Removed Unnecessary comments and white spaces #4386reedlepee-5/+0
2013-10-23Making fields in std and extra : private #4386reedlepee-3/+8
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-33/+33
Who doesn't like a massive renaming?
2013-10-01remove the `float` typeDaniel Micay-110/+101
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30extra: Remove usage of fmt!Alex Crichton-34/+34
2013-09-16extra::json: use a different encoding for enums.Corey Richardson-15/+24
It now uses `{"type": VariantName, "fields": [...]}`, which, according to @Seldaek, since all enums will have the same "shape" rather than being a weird ad-hoc array, will optimize better in javascript JITs. It also looks prettier, and makes more sense.
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-4/+3
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-09-04stop treating char as an integer typeDaniel Micay-4/+7
Closes #7609
2013-08-29drop some redundant Ord method implementationsDavid Creswick-4/+1
2013-08-21Make json::to_xxx(&Json) fns Json::to_xxx(&self)Brandon Sanderson-64/+60
to_str, to_pretty_str, to_writer, and to_pretty_writer were at the top level of extra::json, this moves them into an impl for Json to match with what's been done for the rest of libextra and libstd.
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-3/+3
cc #7887
2013-08-05Use TreeMap's ord implementation for JsonAlex Crichton-18/+1
Closes #4430
2013-08-03remove obsolete `foreach` keywordDaniel Micay-10/+10
this has been replaced by `for`
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-1/+1
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-11/+10
2013-07-27to_either + fixesErick Tryzelaar-10/+9
2013-07-23extra: switch json from hashmaps to treemapsGraydon Hoare-11/+11
2013-07-18hashmap: Remove .consume() has rename .consume_iter() to .consume()blake2-ppc-2/+1
Updated all users of HashMap, HashSet old .consume() to use .consume() with a for loop. Since .consume() takes the map or set by value, it needs awkward extra code to in librusti's use of @mut HashMap, where the map value can not be directly moved out.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-47/+11
2013-07-14Noting that json.rs provides parsing as wellAustin King-1/+1
2013-07-11extra: add explicit ratchet-noise-percent option to benchmark ratchet, plus ↵Graydon Hoare-2/+2
a few test breaking fixes.
2013-07-11extra: add metrics ratchet to test driver.Graydon Hoare-1/+1
2013-07-11extra: add ToJson for TreeMap.Graydon Hoare-0/+11
2013-07-10Convert json Reader to iteratorsGary Linscott-40/+26
This is much faster for strings, and eventually when there is a buffered reader of some sort. Reading example.json 100 times before was around 1.18s. After: - reading from string 0.68s - reading from file 1.08s (extra time is all in io::Reader)
2013-07-08auto merge of #7612 : thestinger/rust/utf8, r=huonwbors-1/+1
2013-07-08auto merge of #7608 : glinscott/rust/json_perf, r=pcwaltonbors-7/+28
Avoids the overhead of read_char for every character. Benchmark reading example.json 10 times from https://code.google.com/p/rapidjson/wiki/Performance Before: 2.55s After: 0.16s Regression testing is already done by isrustfastyet.
2013-07-07remove some method resolve workaroundsDaniel Micay-1/+1
2013-07-05str: stop encoding invalid out-of-range `char`Daniel Micay-1/+1
2013-07-05Switch json parsing to read_chars for performanceGary Linscott-7/+28
Avoids the overhead of read_char for every character. Benchmark reading example.json 10 times from https://code.google.com/p/rapidjson/wiki/Performance Before: 2.55s After: 0.16s Regression testing is already done by isrustfastyet.
2013-07-04Implement consuming iterators for ~[], remove vec::{consume, ↵Huon Wilson-3/+2
consume_reverse, map_consume}.
2013-06-29Warning cleanupCorey Richardson-1/+1