From 0e9495b980363eab634ec54bb177443e874d2508 Mon Sep 17 00:00:00 2001 From: John Clements Date: Thu, 7 Feb 2013 14:39:02 -0800 Subject: [PATCH] json bugfix --- src/libstd/json.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 0d69730f1da..e6156def61b 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -130,12 +130,11 @@ pub impl Encoder: serialize::Encoder { // element provides the enum variant name self.wr.write_char('['); self.wr.write_str(escape_str(name)); - self.wr.write_char(','); f(); self.wr.write_char(']'); } fn emit_enum_variant_arg(&self, idx: uint, f: fn()) { - if idx != 0 {self.wr.write_char(',');} + self.wr.write_char(','); f(); }