about summary refs log tree commit diff
path: root/src/libstd/json.rs
AgeCommit message (Collapse)AuthorLines
2013-05-22libstd: Rename libcore to libstd and libstd to libextra; update makefiles.Patrick Walton-1958/+0
This only changes the directory names; it does not change the "real" metadata names.
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-3/+3
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-9/+3
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-12/+12
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-11Warning policeTim Chevalier-13/+0
2013-05-08libstd: Remove some residual mutable fieldsPatrick Walton-0/+13
2013-05-04Register snapshotsBrian Anderson-631/+0
2013-05-02librustc: Update the serializer to work properly with INHTWAMA, removing ↵Patrick Walton-76/+795
mutable fields in the process
2013-04-27only use #[no_core] in libcoreDaniel Micay-2/+0
2013-04-10syntax: add {read,emit}_enum_struct_variant{,_field}Erick Tryzelaar-1/+32
2013-04-10std: add serialize {read,emit}_tuple{,_arg,_struct,_struct_arg}Erick Tryzelaar-0/+32
2013-04-10std: rename {read,emit}_field to {read,emit}_struct_fieldErick Tryzelaar-1/+49
2013-04-10std: clean up the order of {De,En}codable methodsErick Tryzelaar-49/+49
2013-04-10Revert map.each to something which takes two parametersNiko Matsakis-4/+4
rather than a tuple. The current setup iterates over `BaseIter<(&'self K, &'self V)>` where 'self is a lifetime declared *in the each method*. You can't place such a type in the impl declaration. The compiler currently allows it, but this will not be legal under #5656 and I'm pretty sure it's not sound now.
2013-04-08Removing no longer needed unsafe blocksAlex Crichton-20/+15
2013-04-08Removing some mutable fields in libstdAlex Crichton-18/+18
2013-04-03rename Linear{Map,Set} => Hash{Map,Set}Daniel Micay-8/+8
2013-04-03hashmap: rm linear namespaceDaniel Micay-2/+2
2013-03-30std: add more json decoder tests.Erick Tryzelaar-12/+124
2013-03-30std: clean up the json pretty printer testsErick Tryzelaar-88/+71
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-13/+0
2013-03-29Register snapshotsBrian Anderson-13/+0
2013-03-29std: fix json deserializing vectors and a testErick Tryzelaar-6/+4
2013-03-29std: add Encoder::emit_map and Decoder::read_mapErick Tryzelaar-85/+136
2013-03-29std: remove Encoder::read_rec and Decoder::emit_recErick Tryzelaar-33/+18
2013-03-29std: remove Encoder::emit_tup{,_elt} and Decoder::read_tup{,_elt}Erick Tryzelaar-31/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_vec and ↵Erick Tryzelaar-35/+12
Decoder::read_{owned,managed}_vec
2013-03-29std: remove Encoder::emit_{owned,managed} and Decoder::read_{owned,managed}Erick Tryzelaar-4/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_str and ↵Erick Tryzelaar-38/+8
Decoder::read_{owned,managed}_str
2013-03-28std: change Decoder::read_option to return a generic typeErick Tryzelaar-3/+3
This allows read_option to be used with a custom option type instead of just core::Option.
2013-03-28std: change Decoder::read_option to return a generic typeErick Tryzelaar-3/+3
This allows read_option to be used with a custom option type instead of just core::Option.
2013-03-27std: add some better failure msgs to jsonErick Tryzelaar-3/+3
2013-03-27std: add tests for decoding json enumsErick Tryzelaar-1/+14
2013-03-27std: Decode::read_enum_variant should pass in the variant namesErick Tryzelaar-2/+25
Because the json::Decoder uses the string variant name, we need a way to correlate the string to the enum index. This passes in a static &[&str] to read_enum_variant, which allows the json::Decoder to know which branch it's trying to process.
2013-03-27std: add option type directly to serialize::{En,De}codeErick Tryzelaar-20/+18
2013-03-27std: change default json enum encoder to use strings or a flat vecErick Tryzelaar-41/+16
2013-03-27std: Add tests for json decoding optionsErick Tryzelaar-0/+18
2013-03-27std: fix json PrettyEncoder and add testsErick Tryzelaar-33/+220
2013-03-27std: change fail_unless to assert_eq in json.rsErick Tryzelaar-133/+128
2013-03-27std: clean json test importsErick Tryzelaar-6/+2
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-3/+3
2013-03-26Remove unused imports throughoutAlex Crichton-1/+0
2013-03-26Switched over a bunch of splitting funktions to non-allocating iteratorsMarvin Löbel-1/+2
2013-03-23replace impls with `deriving` where applicableAndrew Paseltiner-9/+1
2013-03-22librustc: Add explicit lifetime binders and new lifetime notation in ↵Patrick Walton-2/+2
core/std/syntax/rustc
2013-03-22libstd: Remove all uses of `pure` from libstd. rs=depurePatrick Walton-11/+11
2013-03-21auto merge of #5407 : jbclements/rust/add-assert-eq-macro, r=jbclementsbors-17/+3
Adds an assert_eq! macro that asserts that its two arguments are equal. Error messages can therefore be somewhat more informative than a simple assert, because the error message includes "expected" and "given" values.
2013-03-20change some uses of fail_unless to assert_eqJohn Clements-17/+3
2013-03-20core: add str::each{,i}_reverseErick Tryzelaar-11/+5
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-3/+7
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.