bson4jackson 2.9.2

It’s been a while since I pos­ted up­dates on bson4­jack­son here on this blog, so now that ver­sion 2.9.2 has just been re­leased, I figured it would be a good idea to fill you all in on what has happened in the lib­rar­y’s de­vel­op­ment lately. bson4­jack­son is an ex­ten­sion to the Jack­son JSON pro­cessor adding sup­port for BSON, a bin­ary rep­res­ent­a­tion of JSON.

The latest ver­sions 2.8.0 up to 2.9.2 have been all about com­pat­ib­il­ity and bug fixes. Here’s an over­view of what has changed:

  • Add sup­port for Decimal128 (thanks to @zig­zago)
  • Sup­port Pattern flags in TokenBuffer
  • Re­factor seri­al­izers and deseri­al­izers to handle TokenBuffer
  • Sup­port for Jack­son 2.8 and 2.9
  • Fix in­fin­ite loop in DynamicOutputBuffer (thanks to @yfinkel­stein)
  • Fix flush() not flush­ing buf­fer (thanks to Jo­nas Zei­ger)
  • Do not flush while writ­ing a doc­u­ment (fixes #80)

I’m happy to re­port that the com­munity around bson4­jack­son has never been so act­ive and that the pro­ject has gained great pop­ular­ity (see be­low). I’d like to thank all users and con­trib­ut­ors!

Projects using bson4jackson

The list of pro­jects us­ing bson4­jack­son has grown sig­ni­fic­antly dur­ing the last year. The fol­low­ing rep­res­ents a short se­lec­tion of pop­u­lar Open Source lib­rar­ies and tools:

Jongo is a rather cool lib­rary that al­lows Mon­goDB to be quer­ied in Java just like you would query it in the Mon­goDB shell. Jongo uses bson4­jack­son to seri­al­ize ob­jects be­fore they are sent to the data­base, and of course to deseri­al­ize quer­ied doc­u­ments.

http://jongo.org/

Mon­go­Jack is a POJO map­per that uses Jack­son and bson4­jack­son to seri­al­ize and deseri­al­ize ob­jects be­fore they are sent to the data­base. Mon­go­Jack is ex­tremely fast and very easy to handle.

http://mongojack.org/

KMongo, a Kot­lin toolkit for Mon­goDB, uses bson4­jack­son for its ob­ject map­ping API. With this, res­ults of Mon­goDB quer­ies are auto­mat­ic­ally mapped to ob­jects.

http://litote.org/kmongo/

JsonJ is a flu­ent Java API for ma­nip­u­lat­ing JSON data struc­tures. The lib­rary not only sup­ports JSON, but also other formats such as YAML, HOCON or—with a little help of bson4­jack­son—BSON.

https://github.com/jillesvangurp/jsonj

Mod­e­Shape is a dis­trib­uted, hier­arch­ical, trans­ac­tional, and con­sist­ent data store with sup­port for quer­ies, full-text search, events, ver­sion­ing, ref­er­ences, and flex­ible and dy­namic schemas. They use bson4­jack­son to test their BSON reader and writer im­ple­ment­a­tion.

http://modeshape.jboss.org/

List your pro­ject here!

I know that there are a lot of other pro­jects out there that use bson4­jack­son. If you want your pro­ject to be ad­ded to this list please leave a com­ment be­low or send me a mes­sage.

More information

For a com­plete de­scrip­tion of bson4­jack­son (in­clud­ing how to down­load it) have a look at my tu­torial.


Posted by Michel Krämer
on May, 19th 2018.