Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example of json use in json.rs #10801

Merged
merged 3 commits into from
Jan 20, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
extra::json: add documentation and examples
  • Loading branch information
musitdev committed Jan 19, 2014
commit aeb541674cb97fdd68eacfda7309a06b39db7a83
2 changes: 1 addition & 1 deletion src/libextra/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ use extra::serialize::Encodable;

fn main() {
let to_encode_object = TestStruct{data_str:~"example of string to encode"};
let mut m = io::mem::MemWriter::new();
let mut m = io::MemWriter::new();
{
let mut encoder = json::Encoder::new(&mut m as &mut std::io::Writer);
to_encode_object.encode(&mut encoder);
Expand Down