From 3b62908c92645bc179d5170daf4d127758ae004d Mon Sep 17 00:00:00 2001 From: Micah Scott Date: Wed, 22 Jan 2025 13:11:00 -0800 Subject: [PATCH 1/2] NEWS updates for minor JSON serialization changes --- src/libbson/NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libbson/NEWS b/src/libbson/NEWS index c4a155c6309..f05595873ce 100644 --- a/src/libbson/NEWS +++ b/src/libbson/NEWS @@ -4,7 +4,10 @@ libbson 1.30.0 (Unreleased) Fixes: * Truncated output of `bson_as_json_with_opts` is changed to no longer split valid UTF-8 sequences. - + * Changes were made to the generated JSON text in some cases: + * Previously, empty arrays and documents would contain one space when serialized alone or two spaces when serialized as a nested item. Empty arrays and documents now uniformly use one space. + * Previously, an array omitted due to the maximum recursion limit would serialize to "{ ... }", as if it were a document. Omitted arrays now serialize to "[ ... ]". + * The maximum recursion limit now applies to legacy codewscope documents. Deeply nested scope documents will now be omitted like any other deeply nested document. libbson 1.29.2 From da06d0544f0d61d120b48e69bcd98e9d75ba0e1e Mon Sep 17 00:00:00 2001 From: mdbmes Date: Wed, 22 Jan 2025 17:51:24 -0800 Subject: [PATCH 2/2] Update src/libbson/NEWS Suggestion from Ezra Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com> --- src/libbson/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libbson/NEWS b/src/libbson/NEWS index f05595873ce..381a4782323 100644 --- a/src/libbson/NEWS +++ b/src/libbson/NEWS @@ -5,7 +5,7 @@ Fixes: * Truncated output of `bson_as_json_with_opts` is changed to no longer split valid UTF-8 sequences. * Changes were made to the generated JSON text in some cases: - * Previously, empty arrays and documents would contain one space when serialized alone or two spaces when serialized as a nested item. Empty arrays and documents now uniformly use one space. + * Previously, empty arrays and documents would serialize with either one or two spaces depending on whether it is nested. Empty arrays and documents now consistently serialize with just one space. * Previously, an array omitted due to the maximum recursion limit would serialize to "{ ... }", as if it were a document. Omitted arrays now serialize to "[ ... ]". * The maximum recursion limit now applies to legacy codewscope documents. Deeply nested scope documents will now be omitted like any other deeply nested document.