Skip to content

Commit 839a91b

Browse files
authored
Merge pull request #20 from spyoungtech/fix-styled-output
fix array styled output
2 parents ad9bcf0 + e77c443 commit 839a91b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl<'input> JSONValue<'input> {
175175
for _ in 0 .. ident {
176176
style.current_indent.push(' ');
177177
}
178-
ret = format!("{{\n{}", style.current_indent);
178+
ret = format!("[\n{}", style.current_indent);
179179
}
180180
}
181181
for (idx, value) in values.iter().enumerate() {
@@ -203,7 +203,7 @@ impl<'input> JSONValue<'input> {
203203
}
204204
Some(ident) => {
205205
style.current_indent.truncate(style.current_indent.len() - ident);
206-
ret.push_str(format!("\n{}}}", style.current_indent).as_str());
206+
ret.push_str(format!("\n{}]", style.current_indent).as_str());
207207
}
208208
}
209209
ret

0 commit comments

Comments
 (0)