From e77c443e44cfb0d93b302dd8c1057204598444db Mon Sep 17 00:00:00 2001 From: Spencer Young Date: Mon, 25 Aug 2025 21:51:45 -0700 Subject: [PATCH] fix array styled output --- src/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 8d553c1..e314e73 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -175,7 +175,7 @@ impl<'input> JSONValue<'input> { for _ in 0 .. ident { style.current_indent.push(' '); } - ret = format!("{{\n{}", style.current_indent); + ret = format!("[\n{}", style.current_indent); } } for (idx, value) in values.iter().enumerate() { @@ -203,7 +203,7 @@ impl<'input> JSONValue<'input> { } Some(ident) => { style.current_indent.truncate(style.current_indent.len() - ident); - ret.push_str(format!("\n{}}}", style.current_indent).as_str()); + ret.push_str(format!("\n{}]", style.current_indent).as_str()); } } ret