- Changes to JSON encoding and decoding:
- New functions bson_as_canonical_extended_json and
bson_as_relaxed_extended_json convert BSON to canonical and
relaxed extended JSON according to MongoDB Extended JSON Spec.
- When parsing JSON type wrappers like "$timestamp", any missing or
extra keys are an error.
- The JSON format for BSON regular expressions is now
"$regularExpression": {"pattern": "...", "options": "..."}.
- The JSON format for BSON binary elements is now "$binary":
{"base64": "...", "subType": "..."}.
- BSON dates can be parsed from "$date" as an ISO8601 date or
"$numberLong" as milliseconds since the epoch: "t": {"$date":
{"$numberLong": "1234"}}.
- The non-numbers NaN, Infinity, and -Infinity are now recognized
(regardless of case) when parsing JSON.
- CMake build now installs .pc files for programs that link to libbson
using pkg-config. Both the CMake and Autotools build systems now
install .cmake
- New CMake option, "ENABLE_STATIC", defaults to ON.
- Minimum required CMake version has been increased to 3.1.
- New functions
- bson_strcasecmp, a portable equivalent of strcasecmp.
- bson_iter_as_double, cast the current value to double.
- bson_iter_init_from_data, creates an iterator from BSON string.
- bson_validate_with_error, checks a document like bson_validate
does but also reports which key was invalid
- New convenience macros
- BSON_ITER_HOLDS_INT, checks if iterator holds int32 or int64
- BSON_ITER_HOLDS_NUMBER, checks if iterator holds int32, int64 or
double
- Raised BSON recursion limit to 200
libbson-1.6.3
- No change since 1.6.2; released to keep pace with libmongoc's
version.
libbson-1.6.2
- This release further improves HP-UX compatibility, especially when
building with CMake, and fixes some distribution issues we
introduced when porting the documentation from Mallard to Sphinx.
Libbson-1.6.1
- This is a bugfix release that resolves GCC 7 compiler warnings,
improves HP-UX compatibility, and avoids a test failure from
launching too many threads on 32-bit MIPS.
Libbson-1.6.0
- Use jsonsl instead of libyajl as our JSON parsing library, parse
JSON more strictly, fix minor parsing bugs.
- Extended JSON documents like '{"$code": "...", "$scope": {}}' are
now parsed into BSON "code" elements.
- ISO8601 dates now allow years from 0000 to 9999 inclusive. Before,
years before 1970 were prohibited.
- BSON floats and ints are now distinguished in JSON output.
- The library is now built and continuously tested with MinGW-W64 on
Windows.
- The documentation is ported from Mallard XML to ReStructured Text,
the HTML documentation is restyled, and numerous man page syntax
errors fixed.
- All public functions now have the __cdecl calling convention on
Windows.
- New BSON Type, Decimal128 (bson_decimal128_t) along with appropriate
new functions and helpers.
- bson_validate and bson_iter_next now validate that BSON boolean values
are 0 or 1.
- bson_append_code_with_scope now preserves the "code with scope" type
if scope is an empty, non-NULL BSON document.
- BSON "code" and "code with scope" types are properly translated to
JSON of the form '{"$code": "...", "$scope": {...}}'.
- bson_json_reader functions now always validate UTF-8.
- JSON parsing now preserves integer width.
- bson_strtoll now matches stroll: it detects range errors, and when
parsing octal it stops at non-octal digits and returns what it parsed
instead of setting errno.
- New flag BSON_VALIDATE_EMPTY_KEYS causes bson_validate to fail if a
document contains zero-length field names.
- The configure option "--enable-hardening" had had no effect. It is
removed in favor of system-wide compiler configuration.
- bson_reader_reset seeks to the beginning of a BSON buffer.
- bson_steal efficiently transfers contents from one bson_t to
another.
- Fix Windows compile error with BSON_EXTRA_ALIGN disabled.
- Potential buffer overrun in bson_strndup.
- bson_oid_to_string optimization for MS Visual Studio
- bson_oid_is_valid accepts uppercase hex characters.
- bson_json_reader_read aborted on some invalid Extended JSON
documents.
- All man page names now begin with "bson_" to avoid install
conflicts.
- Error messages sometimes truncated at 63 chars.
pkgsrc changes:
- Release tarballs cannot build man pages any more, use pre-built
ones instead.
Changes since 1.2.1:
- Fix potential crash in bson_strncpy on Windows.
- Parse DBRefs correctly from JSON.
- CMake option to disable building tests: "cmake -DENABLE_TESTS:BOOL=OFF".
- Refactor the build system to declare library version in one place.
- Fix compiler warnings and errors, especially with Visual Studio 2015
and IBM XL C.
- Combine environment's CFLAGS with configure options when building.
libbson 1.2.0
- Add bson_mem_restore_vtable(), the inverse of bson_mem_set_vtable().
- Enable runtime asserts in release build.
- Fixed compiler warnings and build failures on various platforms.
- Improvements to the formatting and contents of the documentation.
libbson 1.1.11
- Document bson streaming reads with an example, bson-streaming-reader.c.
- Document callback function types bson_reader_destroy_func_t and
bson_reader_read_func_t.
Changes in 0.98:
- This release includes a new memory callback vtable to help in embedding
situations that have their own custom allocator such as various language
runtimes.
- A few compilation fixes for various C++ compilers have also been included.
Changes in 0.8.4:
- Alignment fixes for Solaris Studio C compiler.
- RPM and Debian packaging helpers.
- bson_gettimeofday() has dropped the deprecated timezone field used when
calling posix gettimeofday(). This eases portability concerns. It is
technically an ABI break, but since the field was never set, in reality
it shouldn't be an issue.
- Multi-byte optimizations for bson_oid_to_string() have been disabled on
non-x86 based platforms. This should aid in architecture portability.
- The JSON parser can now support $numberLong.
- bson_ascii_strtoll() has been added, which is a portable strtoll()
implementation. This is primarily useful for Windows users and is used
by the JSON parser.
- A bug was fixed in bson_iter_find_descendant() where the wrong field
could be matched if it's prefix matched the query.
- bson_array_as_json() has been added to convert a bson_t as a top-level
array.
Changes in 0.8.2
----------------
* A fix for BCON when used from C++.
* Change bson_next_power_of_two() to accept size_t. This should not be
an ABI break since it is static inline.
Changes in 0.8.0
----------------
This cycle includes much, much more documentation for your perusing. There is
much more cross-referencing and structure for your navigation pleasure.
We've improved support for Libbson on a few more exotic platforms. SPARC
support is looking pretty good these days.
You'll also find some new examples in this release to help you get started a
bit faster. If there is something you'd like to see, just ask!
There are a few ABI breaks this cycle, as we are well on the road to a 1.0 and
would like things as clean as possible. I anticipate a few more during the next
couple of cycles, but we will try to keep them to a minimum. With that said,
you *WILL* need to recompile your application against 0.8.0.
libbson is a library providing useful routines related to building,
parsing, and iterating BSON documents. It is a useful base for those
wanting to write high-performance C extensions to higher level
languages such as python, ruby, or perl.