aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Berg <vitiral@gmail.com>2017-07-21 12:03:42 -0600
committerGarrett Berg <vitiral@gmail.com>2017-07-21 12:03:42 -0600
commite0bc36051ad764a9032d88ce016b41f7214e4bc2 (patch)
treed17a6416f1b60bfe0ddabebb30aedb871a716713
parent8e4813618556165542bf953140713f6dc71b62b8 (diff)
downloadmilf-rs-e0bc36051ad764a9032d88ce016b41f7214e4bc2.tar.gz
milf-rs-e0bc36051ad764a9032d88ce016b41f7214e4bc2.zip
fix "
-rw-r--r--src/ser.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ser.rs b/src/ser.rs
index 2431737..283fee9 100644
--- a/src/ser.rs
+++ b/src/ser.rs
@@ -413,7 +413,13 @@ impl<'a> Serializer<'a> {
},
'\u{c}' => drop(write!(self.dst, "\\f")),
'\u{d}' => drop(write!(self.dst, "\\r")),
- '\u{22}' => drop(write!(self.dst, "\\\"")),
+ '\u{22}' => {
+ if do_pretty {
+ drop(write!(self.dst, "\""))
+ } else {
+ drop(write!(self.dst, "\\\""))
+ }
+ },
'\u{5c}' => drop(write!(self.dst, "\\\\")),
c if c < '\u{1f}' => {
drop(write!(self.dst, "\\u{:04X}", ch as u32))