about summary refs log tree commit diff
path: root/src/libstd/json.rs
AgeCommit message (Collapse)AuthorLines
2012-02-29libstd: Skip trailing whitespaces after JSON valueTycho Sci-12/+9
2012-02-29libstd: Skip trailing whitespaces after outer rparenTycho Sci-2/+15
This makes "{ \"foo\": 1 }\n" and "[ 1 ]\n" valid json string
2012-02-28std: rewrite json.rs to fix bugs and use readers/writersErick Tryzelaar-214/+653
Our json implementation did not conform to the spec, and was missing support for escpaed characters and exponental numbers. This fixes it, and adds support for reading/writing json directly from/to a stream. There are two things left unimplemented. We could use a "to_json" iface/impl, but that really needs traits to cut down on code duplication. The other is it wouldn't be that not that hard to turn this implementation into a event driven parser like YAJL, but I ran into some type-inference bugs, so I cut that out. It'd be nice to revisit this in the future though.
2012-02-23Finish cleanup of core::strMarijn Haverbeke-4/+0
Closes #1849
2012-02-23(core::str) remove len_bytes aliasKevin Cantu-12/+12
2012-02-23(core::str) replace byte_index[_from] with index[_from]Kevin Cantu-10/+10
2012-02-23(core::char) rename slice -> slice_charsKevin Cantu-9/+10
2012-02-23(core::str) mostly rename len -> len_charsKevin Cantu-10/+10
2012-02-12(core::str) rename byte_len -> len_bytes and rename char_len -> lenKevin Cantu-12/+12
2012-02-01Rename str::char_slice -> str::sliceKevin Cantu-9/+9
2012-02-01Propagating unsafe::slice 1Kevin Cantu-3/+3
2012-01-31Change option::t to optionTim Chevalier-8/+8
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-19lib: ";" to "," in enumsPatrick Walton-6/+6
2012-01-19stdlib: "tag" -> "enum"Patrick Walton-1/+1
2012-01-17libstd: Move std tests into libstdBrian Anderson-0/+55
2012-01-11Implement std::map as an iface/impl instead of an objMarijn Haverbeke-1/+1
2011-12-22json: to_str() also for "null"Lenny222-0/+1
2011-12-22json: add "null"Lenny222-0/+11
2011-12-16reorder args to the various vec, option fns so blk comes lastNiko Matsakis-1/+1
2011-12-16Make 1.f parse as a field access on the integer 1Marijn Haverbeke-4/+4
A dot is only considered part of a number when not followed by a letter Closes #1306
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-1/+1
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-0/+258