From 27efa37f58929e2a34d10f258e33fb107a5261dc Mon Sep 17 00:00:00 2001 From: Adam Petro Date: Fri, 16 May 2025 15:00:08 -0400 Subject: [PATCH] JSON output fix --- src/container.rs | 3 ++- tests/integration_tests.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/container.rs b/src/container.rs index 3f79e6d0..c3c1fd1b 100644 --- a/src/container.rs +++ b/src/container.rs @@ -21,9 +21,10 @@ pub struct BytesContainer { #[serde(skip)] pub codec: Codec, /// The JSON represantation of the bytes. - #[serde(skip)] + #[serde(flatten)] pub json_value: Option, /// The human readable representation of the bytes. + #[serde(skip)] pub humanized: String, /// Context for encoding errors. #[serde(skip)] diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 35d784a7..8c03e6cc 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -397,7 +397,7 @@ mod tests { .expect("Failed waiting for output"); cmd.assert().success(); - cmd.assert().stdout(contains("\\\"test\\\": \\\"echo\\\"")); + cmd.assert().stdout(contains("\"test\": \"echo\"")); Ok(()) }